Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ on:
required: false
type: boolean
default: true
SUPER_LINTER_FILTER_REGEX_EXCLUDE:
required: false
type: string

jobs:
flake8:
Expand Down Expand Up @@ -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.SUPER_LINTER_FILTER_REGEX_EXCLUDE }}
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,26 @@ 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) 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.:

```
jobs:
lint:
uses: mundialis/github-workflows/.github/workflows/linting.yml@main
with:
SUPER_LINTER_FILTER_REGEX_EXCLUDE: ".*processing/templates/template_MAIN_loop.json"
```

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

For `ruff` and `black` linting, another workflow can propose suggestions to a pull request.
Expand Down
Loading