diff --git a/.github/markdownlint-problem-matcher.json b/.github/markdownlint-problem-matcher.json new file mode 100644 index 0000000000..0808dcdd42 --- /dev/null +++ b/.github/markdownlint-problem-matcher.json @@ -0,0 +1,18 @@ + +{ + "problemMatcher": [ + { + "owner": "markdownlint", + "pattern": [ + { + "regexp": "^([^:]*):(\\d+):?(\\d+)?\\s([\\w-\\/]*)\\s(.*)$", + "file": 1, + "line": 2, + "column": 3, + "code": 4, + "message": 5 + } + ] + } + ] +} diff --git a/.github/workflows/eclint.yml b/.github/workflows/eclint.yml deleted file mode 100644 index 25af6af86c..0000000000 --- a/.github/workflows/eclint.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Test Whitespace and line endings - -on: [pull_request] - -jobs: - eclint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2.1.2 - with: - node-version: '12.x' - - run: npm i -g eclint - - run: eclint check diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 0000000000..c0215af099 --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,40 @@ +name: Lint +on: + pull_request: + +jobs: + super-linter: + name: Lint + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v2 + + - name: Setup Node + uses: actions/setup-node@v1 + - name: Add matchers + run: | + echo "::add-matcher::.github/markdownlint-problem-matcher.json" + - name: Lint Code Base + uses: github/super-linter@v3 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + FILTER_REGEX_EXCLUDE: .*.template + + markdownlint: + name: Markdownlint + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v2 + + - name: Setup Node + uses: actions/setup-node@v1 + + - name: Run Markdownlint + run: | + echo "::add-matcher::.github/markdownlint-problem-matcher.json" + npm i -g markdownlint-cli + markdownlint "**/*.md" diff --git a/.github/workflows/markdown-link-check.yml b/.github/workflows/markdown-link-check.yml deleted file mode 100644 index 792d338699..0000000000 --- a/.github/workflows/markdown-link-check.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Check Markdown links - -on: - pull_request: - paths: - - "**/*.md" - -jobs: - markdown-link-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2.1.2 - with: - node-version: '12.x' - - name: Install markdown-link-check - run: npm i -g markdown-link-check - - name: Run markdown-link-check on MD files - run: find . -name "*.md" | xargs -n 1 markdown-link-check -q diff --git a/.github/workflows/shfmt.yml b/.github/workflows/shfmt.yml deleted file mode 100644 index 1427dd1cb8..0000000000 --- a/.github/workflows/shfmt.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Check Shell scripts - -on: - pull_request: - paths: - - "**/*.sh" - -jobs: - shfmt: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - run: docker run -v "$(pwd)":/sh -w /sh peterdavehello/shfmt:2.6.3 shfmt -sr -i 2 -l -w -ci . - - run: git diff --color --exit-code - - shellcheck: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - run: shellcheck *.sh