Code coverage report for lib/commands/lint.js

Statements: 100% (12 / 12)      Branches: 100% (4 / 4)      Functions: 100% (3 / 3)      Lines: 100% (12 / 12)      Ignored: none     

All files » lib/commands/ » lint.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25        24 24 24 3       24 3 3 1   2 1 1   1        
'use strict';
 
/* eslint no-console: 0 */
 
module.exports = lint;
module.exports.description = 'check for common style and uniformity mistakes';
module.exports.parseArgs = function (yargs) {
  yargs.example('$0 lint project.js', 'check documentation style')
  .help('help');
};
 
function lint(documentation, parsedArgs) {
  documentation.lint(parsedArgs.inputs, parsedArgs.options, function (err, lintOutput) {
    if (err) {
      throw err;
    }
    if (lintOutput) {
      console.log(lintOutput);
      process.exit(1);
    } else {
      process.exit(0);
    }
  });
}