Skip to content

Commit 3b3503a

Browse files
authored
Merge pull request #17 from myii/chore/standardise-structure
feat(yamllint): include for this repo and apply rules throughout
2 parents 72dbbd7 + a8cc767 commit 3b3503a

File tree

6 files changed

+41
-17
lines changed

6 files changed

+41
-17
lines changed

.travis.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
---
44
stages:
55
- test
6-
- commitlint
6+
- lint
77
- name: release
88
if: branch = master AND type != pull_request
99

@@ -45,16 +45,21 @@ script:
4545

4646
jobs:
4747
include:
48-
# Define the commitlint stage
49-
- stage: commitlint
48+
# Define the `lint` stage (runs `yamllint` and `commitlint`)
49+
- stage: lint
5050
language: node_js
5151
node_js: lts/*
5252
before_install: skip
5353
script:
54+
# Install and run `yamllint`
55+
- pip install --user yamllint
56+
# yamllint disable-line rule:line-length
57+
- yamllint -s . .yamllint pillar.example
58+
# Install and run `commitlint`
5459
- npm install @commitlint/config-conventional -D
5560
- npm install @commitlint/travis-cli -D
5661
- commitlint-travis
57-
# Define the release stage that runs semantic-release
62+
# Define the release stage that runs `semantic-release`
5863
- stage: release
5964
language: node_js
6065
node_js: lts/*

.yamllint

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=yaml
3+
---
4+
# Extend the `default` configuration provided by `yamllint`
5+
extends: default
6+
7+
# Files to ignore completely
8+
# 1. All YAML files under directory `node_modules/`, introduced during the Travis run
9+
ignore: |
10+
node_modules/
11+
12+
rules:
13+
line-length:
14+
# Increase from default of `80`
15+
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
16+
max: 88

pillar.example

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
sysstat:
55
version: '12.1.5'
66
pkg:
7-
use_upstream_source: False
7+
use_upstream_source: false
88
archive:
99
uri: https://dl.sysstat.com/oss/release
1010

@@ -38,12 +38,10 @@ sysstat:
3838
# dirs:
3939
# files: files_alt
4040
# default: default_alt
41-
# source_files:
42-
# sysstat-config-file-file-managed:
43-
# - 'example_alt.tmpl'
44-
# - 'example_alt.tmpl.jinja'
41+
source_files:
42+
sysstat-config-file-file-managed-config_file:
43+
- 'alt_sysstat.default.jinja'
4544

4645
linux:
47-
#'Alternatives system' priority: zero disables (default)
46+
# 'Alternatives system' priority: zero disables (default)
4847
altpriority: 1000
49-

sysstat/defaults.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ sysstat:
66
version: '12.1.5'
77
pkg:
88
name: sysstat
9-
use_upstream_source: False
9+
use_upstream_source: false
1010
source:
1111
name: /tmp/sysstat
1212
uri: http://pagesperso-orange.fr/sebastien.godard
1313
source: None
14-
source_hash: d3bbc90194326e93fbc7f63cff20894ea20cd05caee1bc6ada3bf602e06970e4 #linux amd64 tarball
15-
trim_output: True {# works in 2018.3.2. onwards #}
14+
# linux amd64 tarball
15+
source_hash: d3bbc90194326e93fbc7f63cff20894ea20cd05caee1bc6ada3bf602e06970e4
16+
# works in 2018.3.2. onwards
17+
trim_output: true
1618
archive_suffix: tar.gz
1719
archive_format: tar
18-
enforce_toplevel: False
20+
enforce_toplevel: false
1921
options: '--strip-components=1'
2022

2123
kernel: ''
@@ -36,5 +38,5 @@ sysstat:
3638
name: sysstat
3739

3840
linux:
39-
#'Alternatives system' priority: zero disables (default)
41+
# 'Alternatives system' priority: zero disables (default)
4042
altpriority: 0

sysstat/osfamilymap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Debian: {}
1616
RedHat:
1717
service:
1818
name: sysstat
19-
enabled: False
19+
enabled: false
2020

2121
Suse: {}
2222

test/integration/default/inspec.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=yaml
3+
---
14
name: default
25
title: sysstat formula
36
maintainer: SaltStack Formulas

0 commit comments

Comments
 (0)