From 6c8e176d41c5025cb98b803c944ed975d7d76a7a Mon Sep 17 00:00:00 2001 From: John Bampton Date: Sun, 11 Apr 2021 21:31:23 +1000 Subject: [PATCH] feat(CI): add the GitHub Super Linter Lint EditorConfig, Markdown and YAML --- .editorconfig | 12 ++++++++++++ .github/linters/.ecrc | 10 ++++++++++ .github/linters/.markdown-lint.yml | 16 ++++++++++++++++ .github/linters/.yaml-lint.yml | 9 +++++++++ .github/workflows/linter.yml | 22 ++++++++++++++++++++++ _config.yml | 5 ++++- super-linter.report/.keep | 0 7 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 .editorconfig create mode 100644 .github/linters/.ecrc create mode 100644 .github/linters/.markdown-lint.yml create mode 100644 .github/linters/.yaml-lint.yml create mode 100644 .github/workflows/linter.yml create mode 100644 super-linter.report/.keep diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..f62b724 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true diff --git a/.github/linters/.ecrc b/.github/linters/.ecrc new file mode 100644 index 0000000..d6791b6 --- /dev/null +++ b/.github/linters/.ecrc @@ -0,0 +1,10 @@ +{ + "verbose": false, + "ignore_defaults": false, + "disable": { + "end_of_line": false, + "trim_trailing_whitespace": false, + "insert_final_newline": false, + "indentation": false + } +} diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml new file mode 100644 index 0000000..b6487c3 --- /dev/null +++ b/.github/linters/.markdown-lint.yml @@ -0,0 +1,16 @@ +MD003: false +MD004: false +MD007: false +MD012: false +MD013: false +MD014: false +MD022: false +MD024: false +MD025: false +MD026: false +MD030: false +MD032: false +MD033: false +MD034: false +MD037: false +MD040: false diff --git a/.github/linters/.yaml-lint.yml b/.github/linters/.yaml-lint.yml new file mode 100644 index 0000000..020049f --- /dev/null +++ b/.github/linters/.yaml-lint.yml @@ -0,0 +1,9 @@ +--- + +extends: default + +rules: + document-start: disable + line-length: disable + trailing-spaces: false + truthy: false diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 0000000..a4fc7b3 --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,22 @@ +name: Lint Code Base + +on: + push: + branches-ignore: [master] + # Remove the line above to run when pushing to master + pull_request: + branches: [master] + +jobs: + build: + name: Lint Code Base + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: github/super-linter@v3 + env: + ERROR_ON_MISSING_EXEC_BIT: true + VALIDATE_EDITORCONFIG: true + VALIDATE_MARKDOWN: true + VALIDATE_YAML: true + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/_config.yml b/_config.yml index 52d089b..7e8181b 100644 --- a/_config.yml +++ b/_config.yml @@ -17,9 +17,12 @@ plugins: - jekyll-sitemap exclude: - CODEOWNERS + - .editorconfig - Gemfile - Gemfile.lock - - README.md - gen_mgemdata.rb - gen_mrbdoc.rb + - README.md + - server + - super-linter.report - vendor diff --git a/super-linter.report/.keep b/super-linter.report/.keep new file mode 100644 index 0000000..e69de29