From de2cdda733496cc7ab28328ff1f40aeea0bb2b36 Mon Sep 17 00:00:00 2001 From: Julia Haas Date: Tue, 24 Mar 2026 14:54:32 +0100 Subject: [PATCH 1/3] add option to exclude files from json linting --- .github/workflows/linting.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 5ea552f..6bdd249 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -79,6 +79,9 @@ on: required: false type: boolean default: true + FILTER_REGEX_EXCLUDE: + required: false + type: string jobs: flake8: @@ -226,3 +229,4 @@ jobs: VALIDATE_RENOVATE: "${{ inputs.VALIDATE_RENOVATE == true && true || '' }}" VALIDATE_XML: "${{ inputs.VALIDATE_XML == true && true || '' }}" VALIDATE_YAML: "${{ inputs.VALIDATE_YAML == true && true || '' }}" + FILTER_REGEX_EXCLUDE: ${{ inputs.FILTER_REGEX_EXCLUDE }} From d0e914c1a3c7c61f1ab9077d1f06abf079f1753d Mon Sep 17 00:00:00 2001 From: Julia Haas Date: Tue, 24 Mar 2026 15:22:04 +0100 Subject: [PATCH 2/3] add info to readme --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 3ff0202..8576cda 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,20 @@ do not exists, although an additional `ruff.toml` file will be merged. See [linting-config-examples](linting-config-examples/README.md) for more details on how to configure the individual linters. +To exclude files (files, folders or patterns) from linting completely +(e.g. to exclude specific files from JSON linting via super-linter) +add them to the `linting.yml` in the repo where the workflow is used, e.g.: + +``` +jobs: + lint: + uses: mundialis/github-workflows/.github/workflows/linting.yml@main + with: + FILTER_REGEX_EXCLUDE: ".*processing/templates/template_MAIN_loop.json" +``` + +Attention: This skips the whole file during linting! -> all-or-nothing per file + ### (Python) Linting - reviewdog For `ruff` and `black` linting, another workflow can propose suggestions to a pull request. From 919ef5e7fea34b53600587a3f8570d3d6848d684 Mon Sep 17 00:00:00 2001 From: Julia Haas <83269984+juleshaas@users.noreply.github.com> Date: Thu, 26 Mar 2026 15:50:46 +0100 Subject: [PATCH 3/3] specify to super linter Apply suggestions from code review Co-authored-by: Carmen Tawalika --- .github/workflows/linting.yml | 4 ++-- README.md | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 6bdd249..473600e 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -79,7 +79,7 @@ on: required: false type: boolean default: true - FILTER_REGEX_EXCLUDE: + SUPER_LINTER_FILTER_REGEX_EXCLUDE: required: false type: string @@ -229,4 +229,4 @@ jobs: VALIDATE_RENOVATE: "${{ inputs.VALIDATE_RENOVATE == true && true || '' }}" VALIDATE_XML: "${{ inputs.VALIDATE_XML == true && true || '' }}" VALIDATE_YAML: "${{ inputs.VALIDATE_YAML == true && true || '' }}" - FILTER_REGEX_EXCLUDE: ${{ inputs.FILTER_REGEX_EXCLUDE }} + FILTER_REGEX_EXCLUDE: ${{ inputs.SUPER_LINTER_FILTER_REGEX_EXCLUDE }} diff --git a/README.md b/README.md index 8576cda..17fbda4 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ do not exists, although an additional `ruff.toml` file will be merged. See [linting-config-examples](linting-config-examples/README.md) for more details on how to configure the individual linters. -To exclude files (files, folders or patterns) from linting completely +To exclude files (files, folders or patterns) to be linted with super linter completely (e.g. to exclude specific files from JSON linting via super-linter) add them to the `linting.yml` in the repo where the workflow is used, e.g.: @@ -47,10 +47,16 @@ jobs: lint: uses: mundialis/github-workflows/.github/workflows/linting.yml@main with: - FILTER_REGEX_EXCLUDE: ".*processing/templates/template_MAIN_loop.json" + SUPER_LINTER_FILTER_REGEX_EXCLUDE: ".*processing/templates/template_MAIN_loop.json" ``` -Attention: This skips the whole file during linting! -> all-or-nothing per file +Attention: This skips the whole file to be linted with super-linter! + -> all-or-nothing per file +To exlude python files, use the dedicated exclude configs (e.g. `.flake8`). + +Always prefer to exlude more specific rules instead of a whole file +as explained in the [linting-config-example](https://github.com/mundialis/github-workflows/tree/main/linting-config-examples#superlinter) + ### (Python) Linting - reviewdog