feat(yamllint): include for this repo and apply rules throughout

* Semi-automated using `ssf-formula` (v0.5.0)
* Fix errors shown below:

```bash
keepalived-formula$ $(grep "\- yamllint" .travis.yml | sed -e "s:^\s\+-\s\(.*\):\1:")
pillar.example
  16:1      warning  missing document start "---"  (document-start)
```
This commit is contained in:
Imran Iqbal 2019-08-06 20:52:27 +01:00
parent 42326bb4d5
commit 9e29ffae76
No known key found for this signature in database
GPG Key ID: 6D8629439D2B7819
4 changed files with 33 additions and 4 deletions

View File

@ -3,7 +3,7 @@
--- ---
stages: stages:
- test - test
- commitlint - lint
- name: release - name: release
if: branch = master AND type != pull_request if: branch = master AND type != pull_request
@ -15,10 +15,12 @@ dist: xenial
services: services:
- docker - docker
# yamllint disable rule:indentation
addons: addons:
apt: apt:
packages: packages:
- ipvsadm - ipvsadm
# yamllint enable rule:indentation
# Make sure the instances listed below match up with # Make sure the instances listed below match up with
# the `platforms` defined in `kitchen.yml` # the `platforms` defined in `kitchen.yml`
@ -51,16 +53,21 @@ script:
jobs: jobs:
include: include:
# Define the commitlint stage # Define the `lint` stage (runs `yamllint` and `commitlint`)
- stage: commitlint - stage: lint
language: node_js language: node_js
node_js: lts/* node_js: lts/*
before_install: skip before_install: skip
script: script:
# Install and run `yamllint`
- pip install --user yamllint
# yamllint disable-line rule:line-length
- yamllint -s . .yamllint pillar.example
# Install and run `commitlint`
- npm install @commitlint/config-conventional -D - npm install @commitlint/config-conventional -D
- npm install @commitlint/travis-cli -D - npm install @commitlint/travis-cli -D
- commitlint-travis - commitlint-travis
# Define the release stage that runs semantic-release # Define the release stage that runs `semantic-release`
- stage: release - stage: release
language: node_js language: node_js
node_js: lts/* node_js: lts/*

16
.yamllint Normal file
View File

@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
# Extend the `default` configuration provided by `yamllint`
extends: default
# Files to ignore completely
# 1. All YAML files under directory `node_modules/`, introduced during the Travis run
ignore: |
node_modules/
rules:
line-length:
# Increase from default of `80`
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
max: 88

View File

@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
# #
# Example pillar configuration # Example pillar configuration
# #

View File

@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: default name: default
title: keepalived formula title: keepalived formula
maintainer: SaltStack Formulas maintainer: SaltStack Formulas