examples/analyzer-inline.spec.js
function itSucks (fileSourceData) {
    var errors = [];

    for (let sample of fileSourceData) {
        errors.push({
            line: sample.line,
            message: 'This code sucks: ' + sample.text
        });
    }

    return {
        // Too noisy to set ```errors: errors```
        // It all sucks, so just say the sucking starts with the first one
        errors: [{
            line: errors.shift().line,
            message: 'It sucks. Starting here.'
        }],
        pass: false
    };
}
function itSucks (fileSourceData) {
    var errors = [];

    for (let sample of fileSourceData) {
        errors.push({
            line: sample.line,
            message: 'This code sucks: ' + sample.text
        });
    }

    return {
        // Too noisy to set ```errors: errors```
        // It all sucks, so just say the sucking starts with the first one
        errors: [{
            line: errors.shift().line,
            message: 'It sucks. Starting here.'
        }],
        pass: false
    };
}
function itSucks ( fileSourceData ) { var errors = [ ] ; for ( let sample of fileSourceData ) { errors . push ( { line : sample . line , message : 'This code sucks: ' + sample . text } ) ; } return { // Too noisy to set ```errors: errors``` // It all sucks, so just say the sucking starts with the first one errors : [ { line : errors . shift ( ) . line , message : 'It sucks. Starting here.' } ] , pass : false } ; }
A pretty harsh analyzer that passes NO files for the reason that "it sucks" starting on line 1.

@param {FileSourceData} fileSourceData - The file source data to analyze.
@returns {Object} An object consistent with a code-copter Analysis object bearing the inevitable message that the code in the analyzed file sucks.
A pretty harsh analyzer that passes NO files for the reason that it sucks starting on line 1 .