Permalink
Browse files

ran through jshint

  • Loading branch information...
1 parent a23cf39 commit 6f49fcbe7831e9e76b8c5b66d6df805e3a6941ee @drewfish committed Apr 8, 2012
Showing with 14 additions and 12 deletions.
  1. +9 −9 lib/crank.js
  2. +4 −3 lib/op-changelog.js
  3. +1 −0 lib/scm-git.js
View
@@ -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();
}
@@ -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)) {
View
@@ -205,6 +205,7 @@ function Template(base) {
Template.prototype.parseChangelog = function(changelog) {
+ /*jshint boss:true */
var tokenized, regexp,
names = {}, idx = 1,
matches,
@@ -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]+):/)) {
View
@@ -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));

0 comments on commit 6f49fcb

Please sign in to comment.