Code coverage report for stylus-lint/src/done.js

Statements: 72.73% (8 / 11)      Branches: 50% (3 / 6)      Functions: 100% (1 / 1)      Lines: 72.73% (8 / 11)      Ignored: none     

All files » stylus-lint/src/ » done.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 26 27 28 29 30 31    1           1 4       4 359       4 4                   4  
'use strict';
 
var chalk = require('chalk');
 
/**
 * @description outputs our error messages when compvare (or a thumbs up if no errors)
 * @return void
 */
module.exports = function done( app ) {
    var i = 0,
        len = app.warnings.length;
 
    // output error messages
    for ( i; i < len; i++ ) {
        console.log( chalk.yellow('Warning: '), app.warnings[i], '\n' );
    }
 
    // if you set a max it displays a slightly more annoying message (that'll show em!)
    Eif ( app.config.maxWarnings && len > app.config.maxWarnings ) {
        console.log( '\uD83D\uDCA9 ', chalk.underline.red( 'Stylint: ' + len + ' warnings. Max is set to: ' + app.config.maxWarnings ) );
    }
    else if ( len === 0 ) {
        console.log( '\uD83D\uDC4D ', chalk.blue( 'Stylint: You\'re all clear!' ) );
    }
    else {
        console.log( '\n\uD83D\uDCA9 ', chalk.yellow( len + ' Warnings' ) );
    }
 
    // reset in case of watch
    app.warnings = [];
}