Edit File by line
/home/barbar84/www/wp-inclu.../js/codemirr...
File: csslint.js
var symbol = symbols[i];
[7500] Fix | Delete
var descriptor = Object.getOwnPropertyDescriptor(parent, symbol);
[7501] Fix | Delete
if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
[7502] Fix | Delete
continue;
[7503] Fix | Delete
}
[7504] Fix | Delete
child[symbol] = _clone(parent[symbol], depth - 1);
[7505] Fix | Delete
if (!descriptor.enumerable) {
[7506] Fix | Delete
Object.defineProperty(child, symbol, {
[7507] Fix | Delete
enumerable: false
[7508] Fix | Delete
});
[7509] Fix | Delete
}
[7510] Fix | Delete
}
[7511] Fix | Delete
}
[7512] Fix | Delete
[7513] Fix | Delete
if (includeNonEnumerable) {
[7514] Fix | Delete
var allPropertyNames = Object.getOwnPropertyNames(parent);
[7515] Fix | Delete
for (var i = 0; i < allPropertyNames.length; i++) {
[7516] Fix | Delete
var propertyName = allPropertyNames[i];
[7517] Fix | Delete
var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName);
[7518] Fix | Delete
if (descriptor && descriptor.enumerable) {
[7519] Fix | Delete
continue;
[7520] Fix | Delete
}
[7521] Fix | Delete
child[propertyName] = _clone(parent[propertyName], depth - 1);
[7522] Fix | Delete
Object.defineProperty(child, propertyName, {
[7523] Fix | Delete
enumerable: false
[7524] Fix | Delete
});
[7525] Fix | Delete
}
[7526] Fix | Delete
}
[7527] Fix | Delete
[7528] Fix | Delete
return child;
[7529] Fix | Delete
}
[7530] Fix | Delete
[7531] Fix | Delete
return _clone(parent, depth);
[7532] Fix | Delete
}
[7533] Fix | Delete
[7534] Fix | Delete
/**
[7535] Fix | Delete
* Simple flat clone using prototype, accepts only objects, usefull for property
[7536] Fix | Delete
* override on FLAT configuration object (no nested props).
[7537] Fix | Delete
*
[7538] Fix | Delete
* USE WITH CAUTION! This may not behave as you wish if you do not know how this
[7539] Fix | Delete
* works.
[7540] Fix | Delete
*/
[7541] Fix | Delete
clone.clonePrototype = function clonePrototype(parent) {
[7542] Fix | Delete
if (parent === null)
[7543] Fix | Delete
return null;
[7544] Fix | Delete
[7545] Fix | Delete
var c = function () {};
[7546] Fix | Delete
c.prototype = parent;
[7547] Fix | Delete
return new c();
[7548] Fix | Delete
};
[7549] Fix | Delete
[7550] Fix | Delete
// private utility functions
[7551] Fix | Delete
[7552] Fix | Delete
function __objToStr(o) {
[7553] Fix | Delete
return Object.prototype.toString.call(o);
[7554] Fix | Delete
}
[7555] Fix | Delete
clone.__objToStr = __objToStr;
[7556] Fix | Delete
[7557] Fix | Delete
function __isDate(o) {
[7558] Fix | Delete
return typeof o === 'object' && __objToStr(o) === '[object Date]';
[7559] Fix | Delete
}
[7560] Fix | Delete
clone.__isDate = __isDate;
[7561] Fix | Delete
[7562] Fix | Delete
function __isArray(o) {
[7563] Fix | Delete
return typeof o === 'object' && __objToStr(o) === '[object Array]';
[7564] Fix | Delete
}
[7565] Fix | Delete
clone.__isArray = __isArray;
[7566] Fix | Delete
[7567] Fix | Delete
function __isRegExp(o) {
[7568] Fix | Delete
return typeof o === 'object' && __objToStr(o) === '[object RegExp]';
[7569] Fix | Delete
}
[7570] Fix | Delete
clone.__isRegExp = __isRegExp;
[7571] Fix | Delete
[7572] Fix | Delete
function __getRegExpFlags(re) {
[7573] Fix | Delete
var flags = '';
[7574] Fix | Delete
if (re.global) flags += 'g';
[7575] Fix | Delete
if (re.ignoreCase) flags += 'i';
[7576] Fix | Delete
if (re.multiline) flags += 'm';
[7577] Fix | Delete
return flags;
[7578] Fix | Delete
}
[7579] Fix | Delete
clone.__getRegExpFlags = __getRegExpFlags;
[7580] Fix | Delete
[7581] Fix | Delete
return clone;
[7582] Fix | Delete
})();
[7583] Fix | Delete
[7584] Fix | Delete
if (typeof module === 'object' && module.exports) {
[7585] Fix | Delete
module.exports = clone;
[7586] Fix | Delete
}
[7587] Fix | Delete
[7588] Fix | Delete
/**
[7589] Fix | Delete
* Main CSSLint object.
[7590] Fix | Delete
* @class CSSLint
[7591] Fix | Delete
* @static
[7592] Fix | Delete
* @extends parserlib.util.EventTarget
[7593] Fix | Delete
*/
[7594] Fix | Delete
[7595] Fix | Delete
/* global parserlib, clone, Reporter */
[7596] Fix | Delete
/* exported CSSLint */
[7597] Fix | Delete
[7598] Fix | Delete
var CSSLint = (function() {
[7599] Fix | Delete
"use strict";
[7600] Fix | Delete
[7601] Fix | Delete
var rules = [],
[7602] Fix | Delete
formatters = [],
[7603] Fix | Delete
embeddedRuleset = /\/\*\s*csslint([^\*]*)\*\//,
[7604] Fix | Delete
api = new parserlib.util.EventTarget();
[7605] Fix | Delete
[7606] Fix | Delete
api.version = "1.0.4";
[7607] Fix | Delete
[7608] Fix | Delete
//-------------------------------------------------------------------------
[7609] Fix | Delete
// Rule Management
[7610] Fix | Delete
//-------------------------------------------------------------------------
[7611] Fix | Delete
[7612] Fix | Delete
/**
[7613] Fix | Delete
* Adds a new rule to the engine.
[7614] Fix | Delete
* @param {Object} rule The rule to add.
[7615] Fix | Delete
* @method addRule
[7616] Fix | Delete
*/
[7617] Fix | Delete
api.addRule = function(rule) {
[7618] Fix | Delete
rules.push(rule);
[7619] Fix | Delete
rules[rule.id] = rule;
[7620] Fix | Delete
};
[7621] Fix | Delete
[7622] Fix | Delete
/**
[7623] Fix | Delete
* Clears all rule from the engine.
[7624] Fix | Delete
* @method clearRules
[7625] Fix | Delete
*/
[7626] Fix | Delete
api.clearRules = function() {
[7627] Fix | Delete
rules = [];
[7628] Fix | Delete
};
[7629] Fix | Delete
[7630] Fix | Delete
/**
[7631] Fix | Delete
* Returns the rule objects.
[7632] Fix | Delete
* @return An array of rule objects.
[7633] Fix | Delete
* @method getRules
[7634] Fix | Delete
*/
[7635] Fix | Delete
api.getRules = function() {
[7636] Fix | Delete
return [].concat(rules).sort(function(a, b) {
[7637] Fix | Delete
return a.id > b.id ? 1 : 0;
[7638] Fix | Delete
});
[7639] Fix | Delete
};
[7640] Fix | Delete
[7641] Fix | Delete
/**
[7642] Fix | Delete
* Returns a ruleset configuration object with all current rules.
[7643] Fix | Delete
* @return A ruleset object.
[7644] Fix | Delete
* @method getRuleset
[7645] Fix | Delete
*/
[7646] Fix | Delete
api.getRuleset = function() {
[7647] Fix | Delete
var ruleset = {},
[7648] Fix | Delete
i = 0,
[7649] Fix | Delete
len = rules.length;
[7650] Fix | Delete
[7651] Fix | Delete
while (i < len) {
[7652] Fix | Delete
ruleset[rules[i++].id] = 1; // by default, everything is a warning
[7653] Fix | Delete
}
[7654] Fix | Delete
[7655] Fix | Delete
return ruleset;
[7656] Fix | Delete
};
[7657] Fix | Delete
[7658] Fix | Delete
/**
[7659] Fix | Delete
* Returns a ruleset object based on embedded rules.
[7660] Fix | Delete
* @param {String} text A string of css containing embedded rules.
[7661] Fix | Delete
* @param {Object} ruleset A ruleset object to modify.
[7662] Fix | Delete
* @return {Object} A ruleset object.
[7663] Fix | Delete
* @method getEmbeddedRuleset
[7664] Fix | Delete
*/
[7665] Fix | Delete
function applyEmbeddedRuleset(text, ruleset) {
[7666] Fix | Delete
var valueMap,
[7667] Fix | Delete
embedded = text && text.match(embeddedRuleset),
[7668] Fix | Delete
rules = embedded && embedded[1];
[7669] Fix | Delete
[7670] Fix | Delete
if (rules) {
[7671] Fix | Delete
valueMap = {
[7672] Fix | Delete
"true": 2, // true is error
[7673] Fix | Delete
"": 1, // blank is warning
[7674] Fix | Delete
"false": 0, // false is ignore
[7675] Fix | Delete
[7676] Fix | Delete
"2": 2, // explicit error
[7677] Fix | Delete
"1": 1, // explicit warning
[7678] Fix | Delete
"0": 0 // explicit ignore
[7679] Fix | Delete
};
[7680] Fix | Delete
[7681] Fix | Delete
rules.toLowerCase().split(",").forEach(function(rule) {
[7682] Fix | Delete
var pair = rule.split(":"),
[7683] Fix | Delete
property = pair[0] || "",
[7684] Fix | Delete
value = pair[1] || "";
[7685] Fix | Delete
[7686] Fix | Delete
ruleset[property.trim()] = valueMap[value.trim()];
[7687] Fix | Delete
});
[7688] Fix | Delete
}
[7689] Fix | Delete
[7690] Fix | Delete
return ruleset;
[7691] Fix | Delete
}
[7692] Fix | Delete
[7693] Fix | Delete
//-------------------------------------------------------------------------
[7694] Fix | Delete
// Formatters
[7695] Fix | Delete
//-------------------------------------------------------------------------
[7696] Fix | Delete
[7697] Fix | Delete
/**
[7698] Fix | Delete
* Adds a new formatter to the engine.
[7699] Fix | Delete
* @param {Object} formatter The formatter to add.
[7700] Fix | Delete
* @method addFormatter
[7701] Fix | Delete
*/
[7702] Fix | Delete
api.addFormatter = function(formatter) {
[7703] Fix | Delete
// formatters.push(formatter);
[7704] Fix | Delete
formatters[formatter.id] = formatter;
[7705] Fix | Delete
};
[7706] Fix | Delete
[7707] Fix | Delete
/**
[7708] Fix | Delete
* Retrieves a formatter for use.
[7709] Fix | Delete
* @param {String} formatId The name of the format to retrieve.
[7710] Fix | Delete
* @return {Object} The formatter or undefined.
[7711] Fix | Delete
* @method getFormatter
[7712] Fix | Delete
*/
[7713] Fix | Delete
api.getFormatter = function(formatId) {
[7714] Fix | Delete
return formatters[formatId];
[7715] Fix | Delete
};
[7716] Fix | Delete
[7717] Fix | Delete
/**
[7718] Fix | Delete
* Formats the results in a particular format for a single file.
[7719] Fix | Delete
* @param {Object} result The results returned from CSSLint.verify().
[7720] Fix | Delete
* @param {String} filename The filename for which the results apply.
[7721] Fix | Delete
* @param {String} formatId The name of the formatter to use.
[7722] Fix | Delete
* @param {Object} options (Optional) for special output handling.
[7723] Fix | Delete
* @return {String} A formatted string for the results.
[7724] Fix | Delete
* @method format
[7725] Fix | Delete
*/
[7726] Fix | Delete
api.format = function(results, filename, formatId, options) {
[7727] Fix | Delete
var formatter = this.getFormatter(formatId),
[7728] Fix | Delete
result = null;
[7729] Fix | Delete
[7730] Fix | Delete
if (formatter) {
[7731] Fix | Delete
result = formatter.startFormat();
[7732] Fix | Delete
result += formatter.formatResults(results, filename, options || {});
[7733] Fix | Delete
result += formatter.endFormat();
[7734] Fix | Delete
}
[7735] Fix | Delete
[7736] Fix | Delete
return result;
[7737] Fix | Delete
};
[7738] Fix | Delete
[7739] Fix | Delete
/**
[7740] Fix | Delete
* Indicates if the given format is supported.
[7741] Fix | Delete
* @param {String} formatId The ID of the format to check.
[7742] Fix | Delete
* @return {Boolean} True if the format exists, false if not.
[7743] Fix | Delete
* @method hasFormat
[7744] Fix | Delete
*/
[7745] Fix | Delete
api.hasFormat = function(formatId) {
[7746] Fix | Delete
return formatters.hasOwnProperty(formatId);
[7747] Fix | Delete
};
[7748] Fix | Delete
[7749] Fix | Delete
//-------------------------------------------------------------------------
[7750] Fix | Delete
// Verification
[7751] Fix | Delete
//-------------------------------------------------------------------------
[7752] Fix | Delete
[7753] Fix | Delete
/**
[7754] Fix | Delete
* Starts the verification process for the given CSS text.
[7755] Fix | Delete
* @param {String} text The CSS text to verify.
[7756] Fix | Delete
* @param {Object} ruleset (Optional) List of rules to apply. If null, then
[7757] Fix | Delete
* all rules are used. If a rule has a value of 1 then it's a warning,
[7758] Fix | Delete
* a value of 2 means it's an error.
[7759] Fix | Delete
* @return {Object} Results of the verification.
[7760] Fix | Delete
* @method verify
[7761] Fix | Delete
*/
[7762] Fix | Delete
api.verify = function(text, ruleset) {
[7763] Fix | Delete
[7764] Fix | Delete
var i = 0,
[7765] Fix | Delete
reporter,
[7766] Fix | Delete
lines,
[7767] Fix | Delete
allow = {},
[7768] Fix | Delete
ignore = [],
[7769] Fix | Delete
report,
[7770] Fix | Delete
parser = new parserlib.css.Parser({
[7771] Fix | Delete
starHack: true,
[7772] Fix | Delete
ieFilters: true,
[7773] Fix | Delete
underscoreHack: true,
[7774] Fix | Delete
strict: false
[7775] Fix | Delete
});
[7776] Fix | Delete
[7777] Fix | Delete
// normalize line endings
[7778] Fix | Delete
lines = text.replace(/\n\r?/g, "$split$").split("$split$");
[7779] Fix | Delete
[7780] Fix | Delete
// find 'allow' comments
[7781] Fix | Delete
CSSLint.Util.forEach(lines, function (line, lineno) {
[7782] Fix | Delete
var allowLine = line && line.match(/\/\*[ \t]*csslint[ \t]+allow:[ \t]*([^\*]*)\*\//i),
[7783] Fix | Delete
allowRules = allowLine && allowLine[1],
[7784] Fix | Delete
allowRuleset = {};
[7785] Fix | Delete
[7786] Fix | Delete
if (allowRules) {
[7787] Fix | Delete
allowRules.toLowerCase().split(",").forEach(function(allowRule) {
[7788] Fix | Delete
allowRuleset[allowRule.trim()] = true;
[7789] Fix | Delete
});
[7790] Fix | Delete
if (Object.keys(allowRuleset).length > 0) {
[7791] Fix | Delete
allow[lineno + 1] = allowRuleset;
[7792] Fix | Delete
}
[7793] Fix | Delete
}
[7794] Fix | Delete
});
[7795] Fix | Delete
[7796] Fix | Delete
var ignoreStart = null,
[7797] Fix | Delete
ignoreEnd = null;
[7798] Fix | Delete
CSSLint.Util.forEach(lines, function (line, lineno) {
[7799] Fix | Delete
// Keep oldest, "unclosest" ignore:start
[7800] Fix | Delete
if (ignoreStart === null && line.match(/\/\*[ \t]*csslint[ \t]+ignore:start[ \t]*\*\//i)) {
[7801] Fix | Delete
ignoreStart = lineno;
[7802] Fix | Delete
}
[7803] Fix | Delete
[7804] Fix | Delete
if (line.match(/\/\*[ \t]*csslint[ \t]+ignore:end[ \t]*\*\//i)) {
[7805] Fix | Delete
ignoreEnd = lineno;
[7806] Fix | Delete
}
[7807] Fix | Delete
[7808] Fix | Delete
if (ignoreStart !== null && ignoreEnd !== null) {
[7809] Fix | Delete
ignore.push([ignoreStart, ignoreEnd]);
[7810] Fix | Delete
ignoreStart = ignoreEnd = null;
[7811] Fix | Delete
}
[7812] Fix | Delete
});
[7813] Fix | Delete
[7814] Fix | Delete
// Close remaining ignore block, if any
[7815] Fix | Delete
if (ignoreStart !== null) {
[7816] Fix | Delete
ignore.push([ignoreStart, lines.length]);
[7817] Fix | Delete
}
[7818] Fix | Delete
[7819] Fix | Delete
if (!ruleset) {
[7820] Fix | Delete
ruleset = this.getRuleset();
[7821] Fix | Delete
}
[7822] Fix | Delete
[7823] Fix | Delete
if (embeddedRuleset.test(text)) {
[7824] Fix | Delete
// defensively copy so that caller's version does not get modified
[7825] Fix | Delete
ruleset = clone(ruleset);
[7826] Fix | Delete
ruleset = applyEmbeddedRuleset(text, ruleset);
[7827] Fix | Delete
}
[7828] Fix | Delete
[7829] Fix | Delete
reporter = new Reporter(lines, ruleset, allow, ignore);
[7830] Fix | Delete
[7831] Fix | Delete
ruleset.errors = 2; // always report parsing errors as errors
[7832] Fix | Delete
for (i in ruleset) {
[7833] Fix | Delete
if (ruleset.hasOwnProperty(i) && ruleset[i]) {
[7834] Fix | Delete
if (rules[i]) {
[7835] Fix | Delete
rules[i].init(parser, reporter);
[7836] Fix | Delete
}
[7837] Fix | Delete
}
[7838] Fix | Delete
}
[7839] Fix | Delete
[7840] Fix | Delete
[7841] Fix | Delete
// capture most horrible error type
[7842] Fix | Delete
try {
[7843] Fix | Delete
parser.parse(text);
[7844] Fix | Delete
} catch (ex) {
[7845] Fix | Delete
reporter.error("Fatal error, cannot continue: " + ex.message, ex.line, ex.col, {});
[7846] Fix | Delete
}
[7847] Fix | Delete
[7848] Fix | Delete
report = {
[7849] Fix | Delete
messages : reporter.messages,
[7850] Fix | Delete
stats : reporter.stats,
[7851] Fix | Delete
ruleset : reporter.ruleset,
[7852] Fix | Delete
allow : reporter.allow,
[7853] Fix | Delete
ignore : reporter.ignore
[7854] Fix | Delete
};
[7855] Fix | Delete
[7856] Fix | Delete
// sort by line numbers, rollups at the bottom
[7857] Fix | Delete
report.messages.sort(function (a, b) {
[7858] Fix | Delete
if (a.rollup && !b.rollup) {
[7859] Fix | Delete
return 1;
[7860] Fix | Delete
} else if (!a.rollup && b.rollup) {
[7861] Fix | Delete
return -1;
[7862] Fix | Delete
} else {
[7863] Fix | Delete
return a.line - b.line;
[7864] Fix | Delete
}
[7865] Fix | Delete
});
[7866] Fix | Delete
[7867] Fix | Delete
return report;
[7868] Fix | Delete
};
[7869] Fix | Delete
[7870] Fix | Delete
//-------------------------------------------------------------------------
[7871] Fix | Delete
// Publish the API
[7872] Fix | Delete
//-------------------------------------------------------------------------
[7873] Fix | Delete
[7874] Fix | Delete
return api;
[7875] Fix | Delete
[7876] Fix | Delete
})();
[7877] Fix | Delete
[7878] Fix | Delete
/**
[7879] Fix | Delete
* An instance of Report is used to report results of the
[7880] Fix | Delete
* verification back to the main API.
[7881] Fix | Delete
* @class Reporter
[7882] Fix | Delete
* @constructor
[7883] Fix | Delete
* @param {String[]} lines The text lines of the source.
[7884] Fix | Delete
* @param {Object} ruleset The set of rules to work with, including if
[7885] Fix | Delete
* they are errors or warnings.
[7886] Fix | Delete
* @param {Object} explicitly allowed lines
[7887] Fix | Delete
* @param {[][]} ingore list of line ranges to be ignored
[7888] Fix | Delete
*/
[7889] Fix | Delete
function Reporter(lines, ruleset, allow, ignore) {
[7890] Fix | Delete
"use strict";
[7891] Fix | Delete
[7892] Fix | Delete
/**
[7893] Fix | Delete
* List of messages being reported.
[7894] Fix | Delete
* @property messages
[7895] Fix | Delete
* @type String[]
[7896] Fix | Delete
*/
[7897] Fix | Delete
this.messages = [];
[7898] Fix | Delete
[7899] Fix | Delete
/**
[7900] Fix | Delete
* List of statistics being reported.
[7901] Fix | Delete
* @property stats
[7902] Fix | Delete
* @type String[]
[7903] Fix | Delete
*/
[7904] Fix | Delete
this.stats = [];
[7905] Fix | Delete
[7906] Fix | Delete
/**
[7907] Fix | Delete
* Lines of code being reported on. Used to provide contextual information
[7908] Fix | Delete
* for messages.
[7909] Fix | Delete
* @property lines
[7910] Fix | Delete
* @type String[]
[7911] Fix | Delete
*/
[7912] Fix | Delete
this.lines = lines;
[7913] Fix | Delete
[7914] Fix | Delete
/**
[7915] Fix | Delete
* Information about the rules. Used to determine whether an issue is an
[7916] Fix | Delete
* error or warning.
[7917] Fix | Delete
* @property ruleset
[7918] Fix | Delete
* @type Object
[7919] Fix | Delete
*/
[7920] Fix | Delete
this.ruleset = ruleset;
[7921] Fix | Delete
[7922] Fix | Delete
/**
[7923] Fix | Delete
* Lines with specific rule messages to leave out of the report.
[7924] Fix | Delete
* @property allow
[7925] Fix | Delete
* @type Object
[7926] Fix | Delete
*/
[7927] Fix | Delete
this.allow = allow;
[7928] Fix | Delete
if (!this.allow) {
[7929] Fix | Delete
this.allow = {};
[7930] Fix | Delete
}
[7931] Fix | Delete
[7932] Fix | Delete
/**
[7933] Fix | Delete
* Linesets not to include in the report.
[7934] Fix | Delete
* @property ignore
[7935] Fix | Delete
* @type [][]
[7936] Fix | Delete
*/
[7937] Fix | Delete
this.ignore = ignore;
[7938] Fix | Delete
if (!this.ignore) {
[7939] Fix | Delete
this.ignore = [];
[7940] Fix | Delete
}
[7941] Fix | Delete
}
[7942] Fix | Delete
[7943] Fix | Delete
Reporter.prototype = {
[7944] Fix | Delete
[7945] Fix | Delete
// restore constructor
[7946] Fix | Delete
constructor: Reporter,
[7947] Fix | Delete
[7948] Fix | Delete
/**
[7949] Fix | Delete
* Report an error.
[7950] Fix | Delete
* @param {String} message The message to store.
[7951] Fix | Delete
* @param {int} line The line number.
[7952] Fix | Delete
* @param {int} col The column number.
[7953] Fix | Delete
* @param {Object} rule The rule this message relates to.
[7954] Fix | Delete
* @method error
[7955] Fix | Delete
*/
[7956] Fix | Delete
error: function(message, line, col, rule) {
[7957] Fix | Delete
"use strict";
[7958] Fix | Delete
this.messages.push({
[7959] Fix | Delete
type : "error",
[7960] Fix | Delete
line : line,
[7961] Fix | Delete
col : col,
[7962] Fix | Delete
message : message,
[7963] Fix | Delete
evidence: this.lines[line-1],
[7964] Fix | Delete
rule : rule || {}
[7965] Fix | Delete
});
[7966] Fix | Delete
},
[7967] Fix | Delete
[7968] Fix | Delete
/**
[7969] Fix | Delete
* Report an warning.
[7970] Fix | Delete
* @param {String} message The message to store.
[7971] Fix | Delete
* @param {int} line The line number.
[7972] Fix | Delete
* @param {int} col The column number.
[7973] Fix | Delete
* @param {Object} rule The rule this message relates to.
[7974] Fix | Delete
* @method warn
[7975] Fix | Delete
* @deprecated Use report instead.
[7976] Fix | Delete
*/
[7977] Fix | Delete
warn: function(message, line, col, rule) {
[7978] Fix | Delete
"use strict";
[7979] Fix | Delete
this.report(message, line, col, rule);
[7980] Fix | Delete
},
[7981] Fix | Delete
[7982] Fix | Delete
/**
[7983] Fix | Delete
* Report an issue.
[7984] Fix | Delete
* @param {String} message The message to store.
[7985] Fix | Delete
* @param {int} line The line number.
[7986] Fix | Delete
* @param {int} col The column number.
[7987] Fix | Delete
* @param {Object} rule The rule this message relates to.
[7988] Fix | Delete
* @method report
[7989] Fix | Delete
*/
[7990] Fix | Delete
report: function(message, line, col, rule) {
[7991] Fix | Delete
"use strict";
[7992] Fix | Delete
[7993] Fix | Delete
// Check if rule violation should be allowed
[7994] Fix | Delete
if (this.allow.hasOwnProperty(line) && this.allow[line].hasOwnProperty(rule.id)) {
[7995] Fix | Delete
return;
[7996] Fix | Delete
}
[7997] Fix | Delete
[7998] Fix | Delete
var ignore = false;
[7999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function