Skip to content

Commit 8b90eb1

Browse files
authored
Merge pull request #250 from myii/chore/standardise-structure
feat(yamllint): include for this repo and apply rules throughout
2 parents c00c058 + 6b7d1fe commit 8b90eb1

File tree

5 files changed

+195
-134
lines changed

5 files changed

+195
-134
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 test/salt/default/pillar/nginx.sls
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

0 commit comments

Comments
 (0)