report.js
function setFilesets(path, done) {
    var config = JSON.parse(fs.readFileSync(path, 'utf8'));

    /* jshint sub: true */
    var includeFiles = config['includeFiles'];
    var excludeFiles = config['excludeFiles'];
    var filterFiles = config['lintOnly'];
    /* jshint sub: false */

    if (filterFiles && !Array.isArray(filterFiles)) {
        filterFiles = [];
        console.log(chalk.yellow('invalid `lintOnly` set; ignoring'));
    }

    if (includeFiles && Array.isArray(includeFiles)) {
        filesets.include(includeFiles, filterFiles);
    } else {
        console.log(chalk.yellow('valid `includeFiles` not found in %s'), path);
    }

    if (excludeFiles && Array.isArray(includeFiles)) {
        filesets.exclude(excludeFiles);
    } else {
        console.log(chalk.yellow('valid `excludeFiles` not found in %s'), path);
    }

    done();
}
function setFilesets(path, done) {
    var config = JSON.parse(fs.readFileSync(path, 'utf8'));

    /* jshint sub: true */
    var includeFiles = config['includeFiles'];
    var excludeFiles = config['excludeFiles'];
    var filterFiles = config['lintOnly'];
    /* jshint sub: false */

    if (filterFiles && !Array.isArray(filterFiles)) {
        filterFiles = [];
        console.log(chalk.yellow('invalid `lintOnly` set; ignoring'));
    }

    if (includeFiles && Array.isArray(includeFiles)) {
        filesets.include(includeFiles, filterFiles);
    } else {
        console.log(chalk.yellow('valid `includeFiles` not found in %s'), path);
    }

    if (excludeFiles && Array.isArray(includeFiles)) {
        filesets.exclude(excludeFiles);
    } else {
        console.log(chalk.yellow('valid `excludeFiles` not found in %s'), path);
    }

    done();
}
function setFilesets ( path , done ) { var config = JSON . parse ( fs . readFileSync ( path , 'utf8' ) ) ; /* jshint sub: true */ var includeFiles = config [ 'includeFiles' ] ; var excludeFiles = config [ 'excludeFiles' ] ; var filterFiles = config [ 'lintOnly' ] ; /* jshint sub: false */ if ( filterFiles && ! Array . isArray ( filterFiles ) ) { filterFiles = [ ] ; console . log ( chalk . yellow ( 'invalid `lintOnly` set; ignoring' ) ) ; } if ( includeFiles && Array . isArray ( includeFiles ) ) { filesets . include ( includeFiles , filterFiles ) ; } else { console . log ( chalk . yellow ( 'valid `includeFiles` not found in %s' ) , path ) ; } if ( excludeFiles && Array . isArray ( includeFiles ) ) { filesets . exclude ( excludeFiles ) ; } else { console . log ( chalk . yellow ( 'valid `excludeFiles` not found in %s' ) , path ) ; } done ( ) ; }
Set the filesets from those defined in the provided configuration file. If a given fileset isn't defined then a warning will be output. The `lintOnly` fileset is an optional fileset that will be excluded from the Plato fileset.
Set the filesets from those defined in the provided configuration file . If a given fileset isn t defined then a warning will be output . The lintOnly fileset is an optional fileset that will be excluded from the Plato fileset .