Skip to content

Commit

Permalink
feat(travis): run shellcheck during lint job
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Nov 27, 2019
1 parent 1ea7fbb commit 3bf311c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
name: 'Lint: salt-lint, yamllint, rubocop & commitlint'
before_install: 'skip'
script:
# Run `shellcheck`
- git ls-files | grep '\.sh$\|\.bash$\|\.ksh$'
| xargs shellcheck
# Install and run `salt-lint`
- pip install --user salt-lint
- git ls-files | grep '\.sls$\|\.jinja$\|\.j2$\|\.tmpl$\|\.tst$'
Expand Down
4 changes: 2 additions & 2 deletions ssf/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ ssf_node_anchors:
# An alternative method could be to use:
# `git describe --abbrev=0 --tags`
# yamllint disable rule:line-length
title: 'ci(travis): use default matrix after `centos-6` image fix'
body: '* Automated using https://github.com/myii/ssf-formula/pull/105'
title: 'ci(travis): run `shellcheck` during lint job [skip ci]'
body: '* Automated using https://github.com/myii/ssf-formula/pull/106'
# yamllint enable rule:line-length
github:
owner: 'saltstack-formulas'
Expand Down
3 changes: 3 additions & 0 deletions ssf/files/default/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ jobs:
name: '{{ name_linters }}'
before_install: 'skip'
script:
# Run `shellcheck`
- git ls-files | grep '\.sh$\|\.bash$\|\.ksh$'
| xargs shellcheck
{#- Prepare variable used for `pip` #}
{%- set pip_cmd = 'pip' %}
{%- if semrel_formula == 'ufw' %}
Expand Down

0 comments on commit 3bf311c

Please sign in to comment.