Skip to content

Commit d1ea26c

Browse files
committed
ci(travis): run salt-lint during the Lint job
* Automated using myii/ssf-formula#60
1 parent 0a167d9 commit d1ea26c

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

.salt-lint

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=yaml
3+
---
4+
exclude_paths: []
5+
skip_list:
6+
# Using `salt-lint` for linting other files as well, such as Jinja macros/templates
7+
- 205 # Use ".sls" as a Salt State file extension
8+
# Skipping `207` and `208` because`210` is sufficient, at least for the time-being
9+
# I.e. Allows 3-digit unquoted codes to still be used, such as `644` and `755`
10+
- 207 # File modes should always be encapsulated in quotation marks
11+
- 208 # File modes should always contain a leading zero
12+
tags: []
13+
verbosity: 1

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,13 @@ jobs:
2828

2929
- language: node_js
3030
node_js: lts/*
31-
env: 'Lint: yamllint & commitlint'
31+
env: 'Lint: salt-lint, yamllint & commitlint'
3232
before_install: skip
3333
script:
34+
# Install and run `salt-lint`
35+
- pip install --user salt-lint
36+
- git ls-files | grep '\.sls$\|\.jinja$\|\.j2$\|\.tmpl$'
37+
| xargs -I {} salt-lint {}
3438
# Install and run `yamllint`
3539
# Need at least `v1.17.0` for the `yaml-files` setting
3640
- pip install --user yamllint>=1.17.0

.yamllint

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ yaml-files:
1717
# Default settings
1818
- '*.yaml'
1919
- '*.yml'
20+
- .salt-lint
2021
- .yamllint
2122
# SaltStack Formulas additional settings
2223
- '*.example'

0 commit comments

Comments
 (0)