Sha256: e4c8715f00cf2eeb2ccbe4d42f30628ba2f4e20779cbb380f2510be77b87ae52

Contents?: true

Size: 1.06 KB

Versions: 45

Compression:

Stored size: 1.06 KB

Contents

/**
 * @fileoverview JSLint XML reporter
 * @author Ian Christian Myers
 */
"use strict";

var lodash = require("lodash");

//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------

module.exports = function(results) {

    var output = "";

    output += "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
    output += "<jslint>";

    results.forEach(function(result) {
        var messages = result.messages;

        output += "<file name=\"" + result.filePath + "\">";

        messages.forEach(function(message) {
            output += "<issue line=\"" + message.line + "\" " +
                "char=\"" + message.column + "\" " +
                "evidence=\"" + lodash.escape(message.source || "") + "\" " +
                "reason=\"" + lodash.escape(message.message || "") +
                (message.ruleId ? " (" + message.ruleId + ")" : "") + "\" />";
        });

        output += "</file>";

    });

    output += "</jslint>";

    return output;
};

Version data entries

45 entries across 45 versions & 2 rubygems

Version Path
govuk_publishing_components-17.6.0 node_modules/eslint/lib/formatters/jslint-xml.js
govuk_publishing_components-17.5.0 node_modules/eslint/lib/formatters/jslint-xml.js
govuk_publishing_components-17.4.0 node_modules/eslint/lib/formatters/jslint-xml.js
govuk_publishing_components-17.3.0 node_modules/eslint/lib/formatters/jslint-xml.js
govuk_publishing_components-17.2.0 node_modules/eslint/lib/formatters/jslint-xml.js
govuk_publishing_components-17.1.1 node_modules/eslint/lib/formatters/jslint-xml.js
govuk_publishing_components-17.1.0 node_modules/eslint/lib/formatters/jslint-xml.js
govuk_publishing_components-17.0.0 node_modules/eslint/lib/formatters/jslint-xml.js
govuk_publishing_components-16.29.0 node_modules/eslint/lib/formatters/jslint-xml.js
govuk_publishing_components-16.28.0 node_modules/eslint/lib/formatters/jslint-xml.js
govuk_publishing_components-16.27.1 node_modules/eslint/lib/formatters/jslint-xml.js
govuk_publishing_components-16.27.0 node_modules/eslint/lib/formatters/jslint-xml.js
govuk_publishing_components-16.26.0 node_modules/eslint/lib/formatters/jslint-xml.js
govuk_publishing_components-16.25.0 node_modules/eslint/lib/formatters/jslint-xml.js
govuk_publishing_components-16.24.0 node_modules/eslint/lib/formatters/jslint-xml.js
govuk_publishing_components-16.23.0 node_modules/eslint/lib/formatters/jslint-xml.js
govuk_publishing_components-16.22.0 node_modules/eslint/lib/formatters/jslint-xml.js
govuk_publishing_components-16.21.0 node_modules/eslint/lib/formatters/jslint-xml.js
govuk_publishing_components-16.20.1 node_modules/eslint/lib/formatters/jslint-xml.js
govuk_publishing_components-16.20.0 node_modules/eslint/lib/formatters/jslint-xml.js