Skip to content

Commit

Permalink
ran through jshint
Browse files Browse the repository at this point in the history
  • Loading branch information
drewfish committed Apr 8, 2012
1 parent a23cf39 commit 6f49fcb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
18 changes: 9 additions & 9 deletions lib/crank.js
Expand Up @@ -274,10 +274,10 @@ function parseArgs(args) {
}


function error(error) {
function error(err) {
// TODO
console.log('--ERROR--');
console.error(error);
console.error(err);
console.log();
}

Expand All @@ -295,13 +295,13 @@ function usage(command) {
}
else {
console.log(
'USAGE: crank {global-options} {command} {command-options}\n'
+ '\n'
+ 'GLOBAL OPTIONS\n'
+ ' --config {file} which config file to use\n'
+ ' (defaults to crank.json)\n'
+ '\n'
+ 'COMMANDS');
'USAGE: crank {global-options} {command} {command-options}\n' +
'\n' +
'GLOBAL OPTIONS\n' +
' --config {file} which config file to use\n' +
' (defaults to crank.json)\n' +
'\n' +
'COMMANDS');
max = 0;
for (op in OPS) {
if (OPS.hasOwnProperty(op)) {
Expand Down
7 changes: 4 additions & 3 deletions lib/op-changelog.js
Expand Up @@ -205,6 +205,7 @@ function Template(base) {


Template.prototype.parseChangelog = function(changelog) {
/*jshint boss:true */
var tokenized, regexp,
names = {}, idx = 1,
matches,
Expand All @@ -215,9 +216,9 @@ Template.prototype.parseChangelog = function(changelog) {
// the formatted string (changelog), but it's good enough to pull out the
// things we care about ({{version}} and {{changeid}}).

tokenized = this.content.replace(/{{#([^}]+)}}[\s\S]*?{{\/\1}}/, ':CRANK:$1:');
tokenized = tokenized.replace(/{{^([^}]+)}}[\s\S]*?{{\/\1}}/, ':CRANK:no-$1:');
tokenized = tokenized.replace(/{?{{([^}]*)}}}?/g, ':CRANK:$1:');
tokenized = this.content.replace(/\{\{#([^}]+)\}\}[\s\S]*?\{\{\/\1\}\}/, ':CRANK:$1:');
tokenized = tokenized.replace(/\{\{^([^}]+)\}\}[\s\S]*?\{\{\/\1\}\}/, ':CRANK:no-$1:');
tokenized = tokenized.replace(/\{?\{\{([^}]*)\}\}\}?/g, ':CRANK:$1:');

regexp = libxregexp.escape(tokenized);
while (matches = regexp.match(/:CRANK:([a-z]+):/)) {
Expand Down
1 change: 1 addition & 0 deletions lib/scm-git.js
Expand Up @@ -75,6 +75,7 @@ SCMGit.prototype.listChanges = function(fromChange, toChange, cb) {


SCMGit.prototype._readRef = function(ref, cb) {
/*jshint boss:true */
var change;
var matches;
change = this.base.fileRead(libpath.join(this.repo, ref));
Expand Down

0 comments on commit 6f49fcb

Please sign in to comment.