|
|
|
|
|
|
|
|
- language: 'node_js' |
|
|
- language: 'node_js' |
|
|
node_js: 'lts/*' |
|
|
node_js: 'lts/*' |
|
|
env: 'Lint' |
|
|
env: 'Lint' |
|
|
name: 'Lint: salt-lint, yamllint & commitlint' |
|
|
|
|
|
|
|
|
name: 'Lint: salt-lint, yamllint, shellcheck & commitlint' |
|
|
before_install: 'skip' |
|
|
before_install: 'skip' |
|
|
script: |
|
|
script: |
|
|
# Install and run `salt-lint` |
|
|
# Install and run `salt-lint` |
|
|
- pip install --user salt-lint |
|
|
- pip install --user salt-lint |
|
|
- git ls-files | grep '\.sls$\|\.jinja$\|\.j2$\|\.tmpl$\|\.tst$' |
|
|
|
|
|
| xargs salt-lint |
|
|
|
|
|
|
|
|
- git ls-files -- *.sls *.jinja *.j2 *.tmpl *.tst |
|
|
|
|
|
| xargs salt-lint |
|
|
# Install and run `yamllint` |
|
|
# Install and run `yamllint` |
|
|
# Need at least `v1.17.0` for the `yaml-files` setting |
|
|
# Need at least `v1.17.0` for the `yaml-files` setting |
|
|
- pip install --user yamllint>=1.17.0 |
|
|
- pip install --user yamllint>=1.17.0 |
|
|
- yamllint -s . |
|
|
- yamllint -s . |
|
|
|
|
|
# Run `shellcheck` (already pre-installed in Travis) |
|
|
|
|
|
- shellcheck --version |
|
|
|
|
|
- git ls-files -- *.sh *.bash *.ksh |
|
|
|
|
|
| xargs shellcheck |
|
|
# Install and run `commitlint` |
|
|
# Install and run `commitlint` |
|
|
- npm i -D @commitlint/config-conventional |
|
|
- npm i -D @commitlint/config-conventional |
|
|
@commitlint/travis-cli |
|
|
@commitlint/travis-cli |