summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2020-03-04 16:21:39 -0500
committerGitHub <noreply@github.com>2020-03-04 16:21:39 -0500
commitf51be629578af6f4e9ac41209d05adb4a63c4aee (patch)
tree560be6ee7f9ea5f850cd0e65700450c6cd7ac15d
parentebe6af9215e3f849139b1a439e0927f6a2824ba4 (diff)
Add yamllint to reviewdog PR checks. (#8291)
-rw-r--r--.github/CODEOWNERS1
-rw-r--r--.github/workflows/reviewdog.yml17
-rw-r--r--.travis.yml11
-rw-r--r--.yamllint.yml30
4 files changed, 47 insertions, 12 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 55eba68c6a..a258263520 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -51,6 +51,7 @@ Dockerfile.* @Ferroin @knatsakis @ncmans @prologic @cosmix
.csslintrc @cosmix @Ferroin @knatsakis @ncmans @prologic
.codeclimate.yml @cosmix @Ferroin @knatsakis @ncmans @prologic
.codacy.yml @cosmix @Ferroin @knatsakis @ncmans @prologic
+.yamllint.yml @cosmix @Ferroin @knatsakis @ncmans @prologic
Dockerfile @Ferroin @knatsakis @ncmans @prologic @cosmix
netdata.spec.in @cosmix @Ferroin @knatsakis @ncmans @prologic
netdata-installer.sh @cosmix @Ferroin @knatsakis @ncmans @prologic
diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml
index a5bdccedca..54024212e5 100644
--- a/.github/workflows/reviewdog.yml
+++ b/.github/workflows/reviewdog.yml
@@ -2,7 +2,7 @@ name: reviewdog
on: [pull_request]
jobs:
eslint:
- name: runner / eslint
+ name: eslint
runs-on: ubuntu-latest
steps:
- name: Git clone repository
@@ -15,7 +15,7 @@ jobs:
eslint_flags: '.'
shellcheck:
- name: runner / shellcheck
+ name: shellcheck
runs-on: ubuntu-latest
steps:
- name: Git clone repository
@@ -28,3 +28,16 @@ jobs:
path: "."
pattern: "*.sh*"
exclude: "./.git/*"
+
+ yamllint:
+ name: yamllint
+ runs-on: ubuntu-latest
+ steps:
+ - name: Git clone repository
+ uses: actions/checkout@v2
+ - name: yamllint
+ uses: reviewdog/action-yamllint@v1
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ reporter: github-pr-check
+ yamllintdd_flags: '.yamllint.yml .travis.yml .github/workflows/*.yml'
diff --git a/.travis.yml b/.travis.yml
index 38386398ca..4a06079daa 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,3 +1,4 @@
+---
dist: bionic
language: c
@@ -35,14 +36,12 @@ install:
- export GIT_TAG="$(git tag --points-at)"
-
# Setup notification system
#
notifications:
webhooks: https://app.fossa.io/hooks/travisci
-
# Define the stage sequence and conditionals
#
stages:
@@ -91,7 +90,6 @@ stages:
if: type != cron AND type != pull_request AND branch = master
-
# Define stage implementation details
#
jobs:
@@ -119,7 +117,6 @@ jobs:
script: cp web/gui/dashboard.js /tmp/dashboard.js && ./build/build.sh && diff /tmp/dashboard.js web/gui/dashboard.js
-
# Ensure netdata code builds successfully
- stage: Build process
@@ -153,7 +150,6 @@ jobs:
after_failure: post_message "TRAVIS_MESSAGE" "'make dist' failed"
-
- stage: Artifacts validation
name: Unit Testing
@@ -182,7 +178,6 @@ jobs:
after_failure: post_message "TRAVIS_MESSAGE" "Build/Install failed on CentOS 7"
-
- stage: "Artifacts validation on bare OS, stable to current lifecycle checks"
# Ubuntu runs
@@ -240,7 +235,6 @@ jobs:
after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare Fedora 31"
-
- stage: Support activities on main branch
name: Generate changelog for release (only on special and tagged commit msg)
before_script: post_message "TRAVIS_MESSAGE" "Support activities on main branch initiated" "${NOTIF_CHANNEL}"
@@ -257,7 +251,6 @@ jobs:
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)
-
# ###### Packaging workflow section ######
# References:
# https://us.images.linuxcontainers.org
@@ -352,7 +345,6 @@ jobs:
- ALLOW_SOFT_FAILURE_HERE=true
-
- stage: Package centos, fedora and opensuse
_template: &RPM_TEMPLATE
git:
@@ -426,7 +418,6 @@ jobs:
# ############################################### #
-
# We only publish if a TAG has been set during packaging
- stage: Publish for release
_template: &RELEASE_TEMPLATE
diff --git a/.yamllint.yml b/.yamllint.yml
new file mode 100644
index 0000000000..4952b8343c
--- /dev/null
+++ b/.yamllint.yml
@@ -0,0 +1,30 @@
+---
+yaml-files:
+ - '*.yaml'
+ - '*.yml'
+ - '.yamllint'
+
+rules:
+ braces: enable
+ brackets: enable
+ colons: enable
+ commas: enable
+ comments: disable
+ comments-indentation: disable
+ document-end: disable
+ document-start:
+ level: warning
+ empty-lines: enable
+ empty-values: disable
+ hyphens: enable
+ indentation: enable
+ key-duplicates: enable
+ key-ordering: disable
+ line-length: disable
+ new-line-at-end-of-file: enable
+ new-lines: enable
+ octal-values: enable
+ quoted-strings: disable
+ trailing-spaces: enable
+ truthy:
+ level: warning