dockerfile_lint
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -6,2 +6,2 @@ 'use strict'; | ||
BASE_RULES: path.join(__dirname, 'base_rules.yaml') | ||
}; | ||
}; |
@@ -13,5 +13,10 @@ 'use strict'; | ||
function stripQuotes(value) { | ||
value = value.replace(/(^")|("$)/g, ''); | ||
value = value.replace(/(^')|('$)/g, ''); | ||
if (value) { | ||
value = value.replace(/(^")|("$)/g, ''); | ||
value = value.replace(/(^')|('$)/g, ''); | ||
} | ||
return value; | ||
} | ||
@@ -18,0 +23,0 @@ |
@@ -391,3 +391,3 @@ // parser.js | ||
var lineno; | ||
var lines = contents.split(/[\r?\n]/); | ||
var lines = contents.split(/[\r\n]/); | ||
var parseResult; | ||
@@ -394,0 +394,0 @@ var partialLine = ''; |
@@ -68,6 +68,5 @@ 'use strict'; | ||
if (!ruleFilePath) { | ||
logger.debug("Effective rule set is :\n" + yamlParser.dump(rules)); | ||
return rules; | ||
} else { | ||
var includedRuleProfiles = []; | ||
ruleFilePath = "config/default_rules.yaml" | ||
} | ||
var includedRuleProfiles = []; | ||
var ruleDirectory = path.dirname(ruleFilePath); //require all rules to be in same dir | ||
@@ -77,3 +76,3 @@ var ruleFileName = path.basename(ruleFilePath); | ||
loadRuleFile(ruleFileName, ruleDirectory, includedRuleProfiles); | ||
logger.debug("Number of rule files found for " + ruleFileName + " " + includedRuleProfiles.length); | ||
logger.debug("Number of rule files found for " + ruleFileName + " " + includedRuleProfiles.length); | ||
includedRuleProfiles.reverse(); | ||
@@ -86,5 +85,4 @@ includedRuleProfiles.forEach(function (profile) { | ||
return rules; | ||
} | ||
} | ||
module.exports.load = load |
{ | ||
"name": "dockerfile_lint", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "Utility for linting a docker file against accepted good practices", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -24,3 +24,3 @@ 'use strict'; | ||
exec('./bin/dockerfile_lint -f https://raw.githubusercontent.com/projectatomic/dockerfile_lint/master/test/data/dockerfiles/TestLabels', | ||
exec('./bin/dockerfile_lint -f -r config/base_rules.yaml https://raw.githubusercontent.com/projectatomic/dockerfile_lint/master/test/data/dockerfiles/TestLabels', | ||
function (err, stdout, stderr) { | ||
@@ -27,0 +27,0 @@ if (err) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
153955
48
2007