www/build/tools/csslint-rhino.js
function(filename, options) {
    var input = readFile(filename),
        result = CSSLint.verify(input, gatherRules(options)),
        formatId = options.format || "text",
        messages = result.messages || [],
        exitCode = 0;

    if (!input) {
        print("csslint: Could not read file data in " + filename + ". Is the file empty?");
        exitCode = 1;
    } else {
        print(CSSLint.getFormatter(formatId).formatResults(result, filename, formatId));

        if (messages.length > 0 && pluckByType(messages, 'error').length > 0) {
            exitCode = 1;
        }
    }
    
    return exitCode;
}
function(filename, options) {
    var input = readFile(filename),
        result = CSSLint.verify(input, gatherRules(options)),
        formatId = options.format || "text",
        messages = result.messages || [],
        exitCode = 0;

    if (!input) {
        print("csslint: Could not read file data in " + filename + ". Is the file empty?");
        exitCode = 1;
    } else {
        print(CSSLint.getFormatter(formatId).formatResults(result, filename, formatId));

        if (messages.length > 0 && pluckByType(messages, 'error').length > 0) {
            exitCode = 1;
        }
    }
    
    return exitCode;
}
function ( filename , options ) { var input = readFile ( filename ) , result = CSSLint . verify ( input , gatherRules ( options ) ) , formatId = options . format || "text" , messages = result . messages || [ ] , exitCode = 0 ; if ( ! input ) { print ( "csslint: Could not read file data in " + filename + ". Is the file empty?" ) ; exitCode = 1 ; } else { print ( CSSLint . getFormatter ( formatId ) . formatResults ( result , filename , formatId ) ) ; if ( messages . length > 0 && pluckByType ( messages , 'error' ) . length > 0 ) { exitCode = 1 ; } } return exitCode ; }
process a list of files, return 1 if one or more error occurred
process a list of files return 1 if one or more error occurred