Browse Source

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

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

```bash
apt-formula$ $(grep "\- yamllint" .travis.yml | sed -e "s:^\s\+-\s\(.*\):\1:")
pillar.example
  7:1       error    trailing spaces  (trailing-spaces)

test/salt/pillar/repositories.pillar.sls
  1:1       warning  missing document start "---"  (document-start)
  19:1      error    too many blank lines (1 > 0)  (empty-lines)

test/salt/pillar/preferences.pillar.sls
  1:1       warning  missing document start "---"  (document-start)
```
tags/v0.9.0
Imran Iqbal 5 years ago
parent
commit
03d15e9acb
No account linked to committer's email address
7 changed files with 38 additions and 6 deletions
  1. +9
    -4
      .travis.yml
  2. +16
    -0
      .yamllint
  3. +1
    -1
      pillar.example
  4. +3
    -0
      test/integration/preferences/inspec.yml
  5. +3
    -0
      test/integration/repositories/inspec.yml
  6. +3
    -0
      test/salt/pillar/preferences.pillar.sls
  7. +3
    -1
      test/salt/pillar/repositories.pillar.sls

+ 9
- 4
.travis.yml View File

--- ---
stages: stages:
- test - test
- commitlint
- lint
- name: release - name: release
if: branch = master AND type != pull_request if: branch = master AND type != pull_request




jobs: jobs:
include: include:
# Define the commitlint stage
- stage: commitlint
# Define the `lint` stage (runs `yamllint` and `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 test/salt/pillar/repositories.pillar.sls test/salt/pillar/preferences.pillar.sls
# 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
- 0
.yamllint View File

# -*- 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

+ 1
- 1
pillar.example View File

apt: apt:
# Set the right keyring for the distro (ie ubuntu-keyring or ...) # Set the right keyring for the distro (ie ubuntu-keyring or ...)
keyring_package: debian-archive-keyring keyring_package: debian-archive-keyring
remove_sources_list: true remove_sources_list: true
clean_sources_list_d: true clean_sources_list_d: true



+ 3
- 0
test/integration/preferences/inspec.yml View File

# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: preferences name: preferences
title: apt formula title: apt formula
maintainer: SaltStack Formulas maintainer: SaltStack Formulas

+ 3
- 0
test/integration/repositories/inspec.yml View File

# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: repositories name: repositories
title: apt formula title: apt formula
maintainer: SaltStack Formulas maintainer: SaltStack Formulas

+ 3
- 0
test/salt/pillar/preferences.pillar.sls View File

# -*- coding: utf-8 -*-
# vim: ft=yaml
---
apt: apt:
remove_preferences: true remove_preferences: true
clean_preferences_d: true clean_preferences_d: true

+ 3
- 1
test/salt/pillar/repositories.pillar.sls View File

# -*- coding: utf-8 -*-
# vim: ft=yaml
---
apt: apt:
remove_sources_list: true remove_sources_list: true
clean_sources_list_d: true clean_sources_list_d: true
arch: [amd64] arch: [amd64]
comps: [] comps: []
key_url: https://cli-assets.heroku.com/apt/release.key key_url: https://cli-assets.heroku.com/apt/release.key


Loading…
Cancel
Save