From fed03428f3efff42ddd1fcc4a0adc2b25a405c6b Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Wed, 5 Mar 2025 15:07:37 +0100 Subject: [PATCH 1/4] try super-linter https://github.com/marketplace/actions/super-linter#get-started --- .github/workflows/lint.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..792d1d4 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,33 @@ +--- +name: Lint + +on: # yamllint disable-line rule:truthy + push: null + pull_request: null + +permissions: {} + +jobs: + build: + name: Lint + runs-on: ubuntu-latest + + permissions: + contents: read + packages: read + # To report GitHub Actions status checks + statuses: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + # super-linter needs the full git history to get the + # list of files that changed across commits + fetch-depth: 0 + + - name: Super-linter + uses: super-linter/super-linter@v7.3.0 # x-release-please-version + env: + # To report GitHub Actions status checks + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From d6666aed034ef84bfdc2b3240d70df29d5b30ece Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Wed, 5 Mar 2025 15:17:34 +0100 Subject: [PATCH 2/4] super-linter: use slim version --- .github/workflows/lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 792d1d4..951e26d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,4 +1,4 @@ ---- +# https://github.com/marketplace/actions/super-linter#get-started name: Lint on: # yamllint disable-line rule:truthy @@ -27,7 +27,7 @@ jobs: fetch-depth: 0 - name: Super-linter - uses: super-linter/super-linter@v7.3.0 # x-release-please-version + uses: super-linter/super-linter/slim@v7.3.0 # x-release-please-version env: # To report GitHub Actions status checks GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From bf2216f73175c74b764a278f48ae9b7331d954ce Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Wed, 5 Mar 2025 15:27:00 +0100 Subject: [PATCH 3/4] super-linter: TODO fix-lint-issues --- .github/workflows/lint.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 951e26d..ab3ad59 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,7 +8,7 @@ on: # yamllint disable-line rule:truthy permissions: {} jobs: - build: + lint: name: Lint runs-on: ubuntu-latest @@ -31,3 +31,5 @@ jobs: env: # To report GitHub Actions status checks GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # TODO automatically fix linting issues and commit them for PRs + # fix-lint-issues: # https://github.com/marketplace/actions/super-linter#github-actions-workflow-example-pull-request From 6aa0f9b8177c2962d217bcd6e54caf84b3dded95 Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Wed, 5 Mar 2025 15:34:03 +0100 Subject: [PATCH 4/4] super-linter: problem matchers included? --- .github/workflows/lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ab3ad59..0ed6b5b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -28,6 +28,7 @@ jobs: - name: Super-linter uses: super-linter/super-linter/slim@v7.3.0 # x-release-please-version + # TODO need to create problem matchers for each linter? https://github.com/rhysd/actionlint/blob/v1.7.7/docs/usage.md#problem-matchers env: # To report GitHub Actions status checks GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}