Comparing version 0.2.0 to 0.3.0
@@ -43,2 +43,7 @@ #!/usr/bin/env node | ||
) | ||
.option( | ||
'-T, --threshold <number>', | ||
'permit this number of errors, warnings, or notices, otherwise fail with exit code 2', | ||
'0' | ||
) | ||
.parse(process.argv); | ||
@@ -76,4 +81,4 @@ | ||
// Decide on an exit code based on whether | ||
// everything passes | ||
if (report.passes < report.total) { | ||
// errors are below threshold or everything passes | ||
if (report.errors >= parseInt(program.threshold, 10) && report.passes < report.total) { | ||
process.exit(2); | ||
@@ -80,0 +85,0 @@ } else { |
# Changelog | ||
## 0.3.0 pre-release (2016-09-20) | ||
* Add a `--threshold` parameter to the command-line interface | ||
## 0.2.0 pre-release (2016-07-26) | ||
@@ -5,0 +9,0 @@ |
@@ -63,2 +63,3 @@ // | ||
passes: 0, | ||
errors: 0, | ||
results: {} | ||
@@ -86,2 +87,3 @@ }; | ||
report.results[url] = errors; | ||
report.errors += errors.length; | ||
} else { | ||
@@ -88,0 +90,0 @@ message += chalk.green(`${errors.length} errors`); |
{ | ||
"name": "pa11y-ci", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "The Pa11y CI application", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
@@ -43,2 +43,3 @@ | ||
-j, --json Output results as JSON | ||
-T, --threshold <number> permit this number of errors, warnings, or notices, otherwise fail with exit code 2 | ||
``` | ||
@@ -45,0 +46,0 @@ |
@@ -20,2 +20,3 @@ // jscs:disable maximumLineLength | ||
total: 3, | ||
errors: 1, | ||
passes: 1, | ||
@@ -22,0 +23,0 @@ results: { |
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
62587
52
1158
171