lib/cli-engine.js
function processText(text, filename, options) {

    var filePath,
        messages,
        stats;

    if (filename) {
        filePath = path.resolve(filename);
    }

    filename = filename || "<text>";
    debug("Linting " + filename);


    messages = bemlint.verify(text, lodash.assign(Object.create(null), {
        filename: filename
    }, options));

    stats = calculateStatsPerFile(messages);

    var result = {
        filePath: filename,
        messages: messages,
        errorCount: stats.errorCount,
        warningCount: stats.warningCount
    };

    return result;
}
function processText(text, filename, options) {

    var filePath,
        messages,
        stats;

    if (filename) {
        filePath = path.resolve(filename);
    }

    filename = filename || "<text>";
    debug("Linting " + filename);


    messages = bemlint.verify(text, lodash.assign(Object.create(null), {
        filename: filename
    }, options));

    stats = calculateStatsPerFile(messages);

    var result = {
        filePath: filename,
        messages: messages,
        errorCount: stats.errorCount,
        warningCount: stats.warningCount
    };

    return result;
}
function processText ( text , filename , options ) { var filePath , messages , stats ; if ( filename ) { filePath = path . resolve ( filename ) ; } filename = filename || "<text>" ; debug ( "Linting " + filename ) ; messages = bemlint . verify ( text , lodash . assign ( Object . create ( null ) , { filename : filename } , options ) ) ; stats = calculateStatsPerFile ( messages ) ; var result = { filePath : filename , messages : messages , errorCount : stats . errorCount , warningCount : stats . warningCount } ; return result ; }
Processes an source code using bemlint.
@param {string} text The source code to check.
@param {string} filename An optional string representing the texts filename.
@returns {Result} The results for linting on this text.
@private
Processes an source code using bemlint .