index.js
function checkFile(fileName, contents) {
    forbiddenCode.forEach(function(forbiddenItem) {
        if (contents.indexOf(forbiddenItem) > -1) {
            /* eslint-disable */
            console.log('FAILURE: '.red + 'You left a '.reset + forbiddenItem.yellow + ' in '.reset + fileName.cyan);
            /* eslint-enable */
            errorFound = true;
        }
    });
}
function checkFile(fileName, contents) {
    forbiddenCode.forEach(function(forbiddenItem) {
        if (contents.indexOf(forbiddenItem) > -1) {
            /* eslint-disable */
            console.log('FAILURE: '.red + 'You left a '.reset + forbiddenItem.yellow + ' in '.reset + fileName.cyan);
            /* eslint-enable */
            errorFound = true;
        }
    });
}
function checkFile ( fileName , contents ) { forbiddenCode . forEach ( function ( forbiddenItem ) { if ( contents . indexOf ( forbiddenItem ) > - 1 ) { /* eslint-disable */ console . log ( 'FAILURE: ' . red + 'You left a ' . reset + forbiddenItem . yellow + ' in ' . reset + fileName . cyan ) ; /* eslint-enable */ errorFound = true ; } } ) ; }
Analyzes a given file for forbidden code
@param {String} fileName
@param {String} contents
Analyzes a given file for forbidden code