Skip to content

Commit f9e638c

Browse files
committed
feat(yamllint): include for this repo and apply rules throughout
* Semi-automated using `ssf-formula` (v0.5.0) * Fix errors shown below: ```bash influxdb-formula$ $(grep "\- yamllint" .travis.yml | sed -e "s:^\s\+-\s\(.*\):\1:") ./influxdb/config_defaults.yaml 1:1 warning missing document start "---" (document-start) ./influxdb/defaults.yaml 1:1 warning missing document start "---" (document-start) 17:24 warning truthy value should be one of [false, true] (truthy) pillar.example 1:1 warning missing document start "---" (document-start) 4:24 warning truthy value should be one of [false, true] (truthy) test/salt/default/pillar/influxdb.sls 5:24 warning truthy value should be one of [false, true] (truthy) ```
1 parent 70f8d6f commit f9e638c

File tree

7 files changed

+45
-11
lines changed

7 files changed

+45
-11
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/pillar/influxdb.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

docs/README.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ influxdb-formula
1414
:scale: 100%
1515
:target: https://github.com/semantic-release/semantic-release
1616

17-
Formula to set up and configure influxdb
17+
Formula to set up and configure influxdb.
1818

1919
.. contents:: **Table of Contents**
2020

@@ -47,7 +47,7 @@ Available states
4747

4848
``influxdb``
4949
^^^^^^^^^^^^
50-
Installs InfluxDB from [provided packages](http://influxdb.com/download/)
50+
Installs InfluxDB from [provided packages](http://influxdb.com/download/).
5151

5252
At the moment you **have** to specify the InfluxDB version in the
5353
``influxdb:version`` pillar.
@@ -83,12 +83,13 @@ Requirements
8383
* Docker
8484

8585
.. code-block:: bash
86+
8687
$ gem install bundler
8788
$ bundle install
8889
$ bin/kitchen test [platform]
8990
90-
Where ``[platform]`` is the platform name defined in ``kitchen.yml``, e.g. ``debian-9-2019-2-py3``.
91-
91+
Where ``[platform]`` is the platform name defined in ``kitchen.yml``,
92+
e.g. ``debian-9-2019-2-py3``.
9293

9394
``bin/kitchen converge``
9495
^^^^^^^^^^^^^^^^^^^^^^^^
@@ -114,3 +115,4 @@ Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``veri
114115
^^^^^^^^^^^^^^^^^^^^^
115116

116117
Gives you SSH access to the instance for manual testing.
118+

influxdb/config_defaults.yaml

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
'0':
25
'13':
36
admin:

influxdb/defaults.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=yaml
3+
---
14
influxdb:
25
config: '/etc/influxdb/influxdb.conf'
36
conf: {}
@@ -14,7 +17,7 @@ influxdb:
1417
system_group: 'influxdb'
1518
system_user: 'influxdb'
1619
toml_module: toml
17-
use_wget_on_install: True
20+
use_wget_on_install: true
1821
tmpl:
1922
config: 'salt://influxdb/files/influxdb.config.jinja'
2023
etc_default: 'salt://influxdb/files/influxdb.etc_default'

pillar.example

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=yaml
3+
---
14
influxdb:
25
version: 0.12.0
36
no_conf_defaults: false
4-
use_wget_on_install: True
7+
use_wget_on_install: true
58
logging:
69
directory: '/var/log/influxdb'
710
file: 'influxd.log'

test/salt/pillar/influxdb.sls

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=yaml
13
---
24
influxdb:
35
version: 0.12.0
46
no_conf_defaults: false
5-
use_wget_on_install: True
7+
use_wget_on_install: true
68
logging:
79
directory: '/var/log/influxdb'
810
file: 'influxd.log'

0 commit comments

Comments
 (0)