--extraRules can be specified multiple times. An example YAML rule set might look something like
- name: custom-no-latest
message: "Don't use `latest` for container versions."
replicated-lint validate supports the following options:
--version Show version number [boolean]
--help Show help [boolean]
--infile, -f Input file to validate. Use "-" for stdin
[string] [default: "-"]
--threshold, -t Threshold of of issues to report
[string] [choices: "info", "warn", "error"] [default: "error"]
--extraRules, -e Path to file containing JSON definitions for additional yaml
rules. Can be specified multiple times.[array] [default: ]
--reporter, -r Output Format to use
[string] [choices: "console", "junit"] [default: "console"]
--outputDir, -o junit reporter only -- path to directory to output junit xml
reports [string] [default: "test-results"]
We compile to ES5 and test on nodejs 7.8.0, but earlier versions of node should work as well.
npm install -g yarn
Running the tests
To run the tests once
To watch files and re-run tests on changes, use the tdd script
make project-import PROJECT=<project-name>
Where <project-name> is the project being updated and should be one of
For more up to date list check the project directory listing.
Regenerating the documentation
replicated-lint docs gen will print reference documentation stdout as markdown. yarn docs will write it to docs/gen.md.
To update the docs in help center, grab everything in replicated-lint/docs/gen.md and paste it into help-center/.../yaml.md, replacing everything below <!-- the rest of this document is autogenerated-->.
replicated-lint is designed with extensibility in mind, making it suitable for general purpose
YAML and JSON linting and policy definition
Flexible, modular rule sets
Autogenerate unit tests and documentation from rule definitions