cfpathcheck
Advanced tools
Comparing version 0.3.2 to 0.4.0
@@ -117,2 +117,3 @@ var fs = require('fs'); | ||
var prefixUsages = []; | ||
var isXMLFile = false; | ||
var lineNumber = 1; | ||
@@ -128,2 +129,9 @@ | ||
// Look for XML file signature | ||
var XMLSearch = line.match(/(<\?xml|type="text\/xml)/); | ||
if (XMLSearch !== null) { | ||
isXMLFile = true; | ||
} | ||
var importSearch = line.match(/prefix=\"([A-Za-z0-9]+)\"/); | ||
@@ -142,9 +150,13 @@ | ||
// console.log(namespaceSearch); | ||
namespaceSearch.forEach(function(value) { | ||
prefixUsages.push({ | ||
prefix: value[1], | ||
line: lineNumber, | ||
column: value.index + 1 | ||
// We're outputting an XML file - don't attempt to collate namespace prefix usages | ||
if (!isXMLFile) { | ||
namespaceSearch.forEach(function(value) { | ||
prefixUsages.push({ | ||
prefix: value[1], | ||
line: lineNumber, | ||
column: value.index + 1 | ||
}); | ||
}); | ||
}); | ||
} | ||
@@ -151,0 +163,0 @@ var taglibMatches = matchAll(line, /taglib=\"([^"]+)\"/g); |
{ | ||
"name": "cfpathcheck", | ||
"description": "Check CFML files for correct paths in cfinclude/cfimport tags", | ||
"version": "0.3.2", | ||
"version": "0.4.0", | ||
"homepage": "https://github.com/timbeadle/cfpathcheck", | ||
@@ -6,0 +6,0 @@ "author": { |
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
16100
219