validate-dockerfile
Advanced tools
Comparing version 1.4.3 to 1.4.4
@@ -21,5 +21,5 @@ 'use strict'; | ||
entrypoint: /.+/, | ||
add: /^([A-z0-9\/_.-]+|https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*))\s[A-z0-9\/_.-]+$/, | ||
volume: /^([A-z0-9\/_.-]+|\["[A-z0-9\/_.-]+"\])$/, | ||
workdir: /^[A-z0-9\/_.-]+$/ | ||
add: /^(~?[A-z0-9\/_.-]+|https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*))\s~?[A-z0-9\/_.-]+$/, | ||
volume: /^~?([A-z0-9\/_.-]+|\["[A-z0-9\/_.-]+"\])$/, | ||
workdir: /^~?[A-z0-9\/_.-]+$/ | ||
}; | ||
@@ -71,3 +71,2 @@ | ||
currentLine++; | ||
line = line.trim(); | ||
if (!line || line[0] === '#') { | ||
@@ -74,0 +73,0 @@ return; |
{ | ||
"name": "validate-dockerfile", | ||
"version": "1.4.3", | ||
"version": "1.4.4", | ||
"description": "Validates a Dockerfile", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -77,2 +77,6 @@ 'use strict'; | ||
)); | ||
it('Should reject with just a space', expectsFailure( | ||
'MAINTAINER ' | ||
)); | ||
}); | ||
@@ -137,2 +141,6 @@ | ||
it('Allows ADD commands that reference homedir', expectsSuccess( | ||
'ADD ~/tie-fighter ~/hangar' | ||
)); | ||
it('Rejects a malformed URL', expectsFailure( | ||
@@ -164,2 +172,6 @@ 'ADD htp://superlaser.com /Alderaan' | ||
it('Should take a VOLUME that references homedir', expectsSuccess( | ||
'VOLUME ~/1.72x10tothe7thpower' | ||
)); | ||
it('Rejects improper JSON', expectsFailure( | ||
@@ -174,3 +186,7 @@ 'VOLUME ["1.72' | ||
)); | ||
it('Should take a WORKDIR that references homedir', expectsSuccess( | ||
'WORKDIR ~/Despayre' | ||
)); | ||
}); | ||
}); |
@@ -24,3 +24,3 @@ 'use strict'; | ||
if (!isValid.valid) { | ||
counter.next(new Error(isValid[0].message)); | ||
counter.next(new Error(isValid.errors[0].message)); | ||
} | ||
@@ -27,0 +27,0 @@ counter.next(); |
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
27515
465