From 11fe8f124bf123b94d3ab632a7c5cd46ba164409 Mon Sep 17 00:00:00 2001 From: Vincent Chalamon <407859+vincentchalamon@users.noreply.github.com> Date: Thu, 7 Dec 2023 12:28:23 +0100 Subject: [PATCH] chore: try super-linter --- .editorconfig | 10 ++++++++-- .github/workflows/ci.yml | 13 ------------- .github/workflows/lint.yaml | 30 ++++++++++++++++++++++++++++++ .hadolint.yaml | 6 ++++++ .markdown-lint.yaml | 4 ++++ 5 files changed, 48 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/lint.yaml create mode 100644 .hadolint.yaml create mode 100644 .markdown-lint.yaml diff --git a/.editorconfig b/.editorconfig index 8ce2fa867..4ee81c2e2 100644 --- a/.editorconfig +++ b/.editorconfig @@ -34,10 +34,16 @@ indent_size = 4 [*.{yaml,yml}] trim_trailing_whitespace = false -[helm/api-platform/**.yaml] +[.hadolint.yaml] indent_size = 2 -[.github/workflows/*.yml] +[.markdown-lint.yaml] +indent_size = 2 + +[helm/api-platform/**.{yaml,yml}] +indent_size = 2 + +[.github/**.{yaml,yml}] indent_size = 2 [.gitmodules] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1206205d0..ad6cbc3ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -166,16 +166,3 @@ jobs: with: name: playwright-screenshots path: pwa/test-results - - lint: - name: Docker Lint - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v4 - - - name: Lint Dockerfiles - uses: hadolint/hadolint-action@v3.1.0 - with: - recursive: true diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 000000000..dd4d24ad1 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,30 @@ +name: Lint Code Base +on: + pull_request: + branches: + - main + push: + branches: + - main + +jobs: + build: + name: Lint Code Base + runs-on: ubuntu-latest + + permissions: + contents: read + packages: read + statuses: write + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Lint Code Base + uses: super-linter/super-linter@v5 + env: + DEFAULT_BRANCH: main + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + MARKDOWN_CONFIG_FILE: .markdown-lint.yaml diff --git a/.hadolint.yaml b/.hadolint.yaml new file mode 100644 index 000000000..a33477db5 --- /dev/null +++ b/.hadolint.yaml @@ -0,0 +1,6 @@ +--- +ignored: + - DL3006 + - DL3008 + - DL3018 + - DL3022 diff --git a/.markdown-lint.yaml b/.markdown-lint.yaml new file mode 100644 index 000000000..0fe7cd835 --- /dev/null +++ b/.markdown-lint.yaml @@ -0,0 +1,4 @@ +--- +no-hard-tabs: false +MD013: false +MD033: false