Clean up space-after-keywords lint violations

This eliminates the following when running `gulp lint`:

> error  Keyword "catch" must be followed by whitespace

Closes #1083
This commit is contained in:
Alex Nicksay 2015-10-07 10:26:23 -04:00
parent bd1cb9d166
commit 13f09f397c
9 changed files with 12 additions and 12 deletions

4
cli.js
View File

@ -81,7 +81,7 @@ cli.loadConfig = function() {
try { try {
isFile = fs.statSync(confPath).isFile(); isFile = fs.statSync(confPath).isFile();
} }
catch(e) { catch (e) {
isFile = false; isFile = false;
} }
@ -423,7 +423,7 @@ cli.generateDocs = function() {
try { try {
template = require(env.opts.template + '/publish'); template = require(env.opts.template + '/publish');
} }
catch(e) { catch (e) {
logger.fatal('Unable to load template: ' + e.message || e); logger.fatal('Unable to load template: ' + e.message || e);
} }

View File

@ -122,7 +122,7 @@ global.app = (function() {
try { try {
cli.runCommand(cb); cli.runCommand(cb);
} }
catch(e) { catch (e) {
if (e.rhinoException) { if (e.rhinoException) {
logger.fatal( e.rhinoException.printStackTrace() ); logger.fatal( e.rhinoException.printStackTrace() );
} else { } else {

View File

@ -105,7 +105,7 @@ exports.getResourcePath = function(filepath, filename) {
try { try {
fs.readdirSync(_path); fs.readdirSync(_path);
} }
catch(e) { catch (e) {
return false; return false;
} }

View File

@ -171,7 +171,7 @@ Parser.prototype.parse = function(sourceFiles, encoding) {
try { try {
sourceCode = fs.readFileSync(filename, encoding); sourceCode = fs.readFileSync(filename, encoding);
} }
catch(err) { catch (err) {
logger.error('Unable to read and parse the source file %s: %s', filename, err); logger.error('Unable to read and parse the source file %s: %s', filename, err);
} }
} }

View File

@ -84,7 +84,7 @@ function setDocletScopeToTitle(doclet, tag) {
try { try {
doclet.setScope(tag.title); doclet.setScope(tag.title);
} }
catch(e) { catch (e) {
jsdoc.util.logger.error(e.message); jsdoc.util.logger.error(e.message);
} }
} }

View File

@ -13,7 +13,7 @@ var toDir = exports.toDir = function(_path) {
try { try {
isDirectory = fs.statSync(_path).isDirectory(); isDirectory = fs.statSync(_path).isDirectory();
} }
catch(e) { catch (e) {
isDirectory = false; isDirectory = false;
} }

View File

@ -37,7 +37,7 @@ exports.handlers = {
try { try {
value = JSON.parse(tag.value); value = JSON.parse(tag.value);
} }
catch(e) { catch (e) {
logger.error('@source tag expects a valid JSON value, like { "filename": "myfile.js", "lineno": 123 }.'); logger.error('@source tag expects a valid JSON value, like { "filename": "myfile.js", "lineno": 123 }.');
return; return;
} }

View File

@ -607,7 +607,7 @@ jasmine.XmlHttpRequest = (typeof XMLHttpRequest == "undefined") ? function() {
function tryIt(f) { function tryIt(f) {
try { try {
return f(); return f();
} catch(e) { } catch (e) {
} }
return null; return null;
} }
@ -806,7 +806,7 @@ jasmine.Env.prototype.describe = function(description, specDefinitions) {
var declarationError = null; var declarationError = null;
try { try {
specDefinitions.call(suite); specDefinitions.call(suite);
} catch(e) { } catch (e) {
declarationError = e; declarationError = e;
} }
@ -1608,7 +1608,7 @@ jasmine.FakeTimer.prototype.runFunctionsWithinRange = function(oldMillis, nowMil
funcToRun.millis, funcToRun.millis,
true); true);
} }
} catch(e) { } catch (e) {
} }
} }
this.runFunctionsWithinRange(oldMillis, nowMillis); this.runFunctionsWithinRange(oldMillis, nowMillis);

View File

@ -54,7 +54,7 @@ function isValidSpec(file, matcher) {
// ...be relevant to the current runtime // ...be relevant to the current runtime
file.indexOf(skipPath) === -1; file.indexOf(skipPath) === -1;
} }
catch(e) { catch (e) {
result = false; result = false;
} }