Add yamllint to reviewdog PR checks. (#8291)
Austin S. Hemmelgarn committed
Mar 4, 2020 at 16:21 UTC
f51be629578af6f4e9ac41209d05adb4a63c4aee
4 files changed
+47
-12
.github/CODEOWNERS
+1
@@ -51,6 +51,7 @@ Dockerfile.* @Ferroin @knatsakis @ncmans @prologic @cosmix
51
.csslintrc @cosmix @Ferroin @knatsakis @ncmans @prologic
52
.codeclimate.yml @cosmix @Ferroin @knatsakis @ncmans @prologic
53
.codacy.yml @cosmix @Ferroin @knatsakis @ncmans @prologic
54
+.yamllint.yml @cosmix @Ferroin @knatsakis @ncmans @prologic
55
Dockerfile @Ferroin @knatsakis @ncmans @prologic @cosmix
56
netdata.spec.in @cosmix @Ferroin @knatsakis @ncmans @prologic
57
netdata-installer.sh @cosmix @Ferroin @knatsakis @ncmans @prologic
.github/workflows/reviewdog.yml
+15
-2
@@ -2,7 +2,7 @@ name: reviewdog
2
on: [pull_request]
3
jobs:
4
eslint:
5
- name: runner / eslint
5
+ name: eslint
6
runs-on: ubuntu-latest
7
steps:
8
- name: Git clone repository
@@ -15,7 +15,7 @@ jobs:
15
eslint_flags: '.'
16
17
shellcheck:
18
- name: runner / shellcheck
18
+ name: shellcheck
19
runs-on: ubuntu-latest
20
steps:
21
- name: Git clone repository
@@ -28,3 +28,16 @@ jobs:
28
path: "."
29
pattern: "*.sh*"
30
exclude: "./.git/*"
31
+
32
+ yamllint:
33
+ name: yamllint
34
+ runs-on: ubuntu-latest
35
+ steps:
36
+ - name: Git clone repository
37
+ uses: actions/checkout@v2
38
+ - name: yamllint
39
+ uses: reviewdog/action-yamllint@v1
40
+ with:
41
+ github_token: ${{ secrets.GITHUB_TOKEN }}
42
+ reporter: github-pr-check
43
+ yamllintdd_flags: '.yamllint.yml .travis.yml .github/workflows/*.yml'
.travis.yml
+1
-10
@@ -1,3 +1,4 @@
1
+---
2
dist: bionic
3
language: c
4
@@ -35,14 +36,12 @@ install:
36
- export GIT_TAG="$(git tag --points-at)"
37
38
38
-
39
# Setup notification system
40
#
41
notifications:
42
webhooks: https://app.fossa.io/hooks/travisci
43
44
45
-
45
# Define the stage sequence and conditionals
46
#
47
stages:
@@ -91,7 +90,6 @@ stages:
90
if: type != cron AND type != pull_request AND branch = master
91
92
94
-
93
# Define stage implementation details
94
#
95
jobs:
@@ -119,7 +117,6 @@ jobs:
117
script: cp web/gui/dashboard.js /tmp/dashboard.js && ./build/build.sh && diff /tmp/dashboard.js web/gui/dashboard.js
118
119
122
-
120
# Ensure netdata code builds successfully
121
- stage: Build process
122
@@ -153,7 +150,6 @@ jobs:
150
after_failure: post_message "TRAVIS_MESSAGE" "'make dist' failed"
151
152
156
-
153
- stage: Artifacts validation
154
155
name: Unit Testing
@@ -182,7 +178,6 @@ jobs:
178
after_failure: post_message "TRAVIS_MESSAGE" "Build/Install failed on CentOS 7"
179
180
185
-
181
- stage: "Artifacts validation on bare OS, stable to current lifecycle checks"
182
183
# Ubuntu runs
@@ -240,7 +235,6 @@ jobs:
235
after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare Fedora 31"
236
237
243
-
238
- stage: Support activities on main branch
239
name: Generate changelog for release (only on special and tagged commit msg)
240
before_script: post_message "TRAVIS_MESSAGE" "Support activities on main branch initiated" "${NOTIF_CHANNEL}"
@@ -257,7 +251,6 @@ jobs:
251
if: commit_message =~ /\[netdata (release candidate|(major|minor|patch) release)\]/ AND tag !~ /(-rc)/ OR (env(GIT_TAG) IS present AND NOT env(GIT_TAG) IS blank)
252
253
260
-
254
# ###### Packaging workflow section ######
255
# References:
256
# https://us.images.linuxcontainers.org
@@ -352,7 +345,6 @@ jobs:
345
- ALLOW_SOFT_FAILURE_HERE=true
346
347
355
-
348
- stage: Package centos, fedora and opensuse
349
_template: &RPM_TEMPLATE
350
git:
@@ -426,7 +418,6 @@ jobs:
418
# ############################################### #
419
420
429
-
421
# We only publish if a TAG has been set during packaging
422
- stage: Publish for release
423
_template: &RELEASE_TEMPLATE
.yamllint.yml
new
+30
@@ -0,0 +1,30 @@
1
+---
2
+yaml-files:
3
+ - '*.yaml'
4
+ - '*.yml'
5
+ - '.yamllint'
6
+
7
+rules:
8
+ braces: enable
9
+ brackets: enable
10
+ colons: enable
11
+ commas: enable
12
+ comments: disable
13
+ comments-indentation: disable
14
+ document-end: disable
15
+ document-start:
16
+ level: warning
17
+ empty-lines: enable
18
+ empty-values: disable
19
+ hyphens: enable
20
+ indentation: enable
21
+ key-duplicates: enable
22
+ key-ordering: disable
23
+ line-length: disable
24
+ new-line-at-end-of-file: enable
25
+ new-lines: enable
26
+ octal-values: enable
27
+ quoted-strings: disable
28
+ trailing-spaces: enable
29
+ truthy:
30
+ level: warning