Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cli/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function cli(api) {
function processFile(relativeFilePath, options) {
var input = api.readFile(relativeFilePath),
ruleset = filterRules(options),
result = CSSLint.verify(input, gatherRules(options, ruleset)),
result = CSSLint.verify(input, gatherRules(options, ruleset), options),
formatter = CSSLint.getFormatter(options.format || "text"),
messages = result.messages || [],
output,
Expand Down
5 changes: 3 additions & 2 deletions src/core/CSSLint.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,11 @@ var CSSLint = (function() {
* @param {Object} ruleset (Optional) List of rules to apply. If null, then
* all rules are used. If a rule has a value of 1 then it's a warning,
* a value of 2 means it's an error.
* @param {Object} options (Optional) options for processing
* @return {Object} Results of the verification.
* @method verify
*/
api.verify = function(text, ruleset) {
api.verify = function(text, ruleset, options) {

var i = 0,
reporter,
Expand Down Expand Up @@ -245,7 +246,7 @@ var CSSLint = (function() {
for (i in ruleset) {
if (ruleset.hasOwnProperty(i) && ruleset[i]) {
if (rules[i]) {
rules[i].init(parser, reporter);
rules[i].init(parser, reporter, options);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/Reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Reporter.prototype = {
line : line,
col : col,
message : message,
evidence: this.lines[line-1],
evidence: this.lines[line-1] || "",
rule : rule
});
},
Expand Down