From c8510574b596c5a75175dc56b305a2a11e9aca9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matou=C5=A1=20Volf?= <66163112+matous-volf@users.noreply.github.com> Date: Thu, 15 Aug 2024 12:23:10 +0200 Subject: [PATCH] ci: add a GitHub action for code linting --- .github/workflows/lint.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 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..1fd6962 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,40 @@ +name: lint + +on: + pull_request: + types: [ opened, synchronize, reopened, edited ] + +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 check + uses: super-linter/super-linter@v6.9.0 # x-release-please-version + env: + # to report GitHub Actions status checks + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VALIDATE_ALL_CODEBASE: false + FIX_CSS_PRETTIER: true + FIX_HTML_PRETTIER: true + FIX_JAVASCRIPT_ES: true + FIX_JSON_PRETTIER: true + FIX_RUST_2021: true + FIX_RUST_CLIPPY: true + FIX_TYPESCRIPT_ES: true + FIX_YAML_PRETTIER: true