mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-24 23:21:12 -05:00
docs: improve ignore/exclude examples (#6088)
Some checks failed
Publish Images / Build and Test (push) Has been cancelled
Build and Test / Set build metadata (push) Has been cancelled
Build and Test / Build test suite matrix (push) Has been cancelled
Build and Test / preview-release-notes (push) Has been cancelled
Lint commit / commitlint (push) Has been cancelled
Publish Images / Release (push) Has been cancelled
Build and Test / Build and Test (push) Has been cancelled
Build and Test / Test the Super-linter GitHub Action (push) Has been cancelled
Build and Test / Run test cases (push) Has been cancelled
Build and Test / Check if all the tests passed (push) Has been cancelled
Some checks failed
Publish Images / Build and Test (push) Has been cancelled
Build and Test / Set build metadata (push) Has been cancelled
Build and Test / Build test suite matrix (push) Has been cancelled
Build and Test / preview-release-notes (push) Has been cancelled
Lint commit / commitlint (push) Has been cancelled
Publish Images / Release (push) Has been cancelled
Build and Test / Build and Test (push) Has been cancelled
Build and Test / Test the Super-linter GitHub Action (push) Has been cancelled
Build and Test / Run test cases (push) Has been cancelled
Build and Test / Check if all the tests passed (push) Has been cancelled
* Provide more robust regexps for ignore/exclude examples * Drop stray backticks from `LINTER_RULES_PATH` example
This commit is contained in:
parent
5d6e3fcecc
commit
c9116aac88
1 changed files with 15 additions and 7 deletions
20
README.md
20
README.md
|
@ -601,7 +601,7 @@ For example, you can configure super-linter to load configuration files from the
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
env:
|
env:
|
||||||
LINTER_RULES_PATH: `config/lint`
|
LINTER_RULES_PATH: config/lint
|
||||||
```
|
```
|
||||||
|
|
||||||
Some of the linters that super-linter provides can be configured to disable
|
Some of the linters that super-linter provides can be configured to disable
|
||||||
|
@ -617,12 +617,20 @@ two environment variables: `FILTER_REGEX_INCLUDE` and `FILTER_REGEX_EXCLUDE`.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
- Lint only the `src` folder: `FILTER_REGEX_INCLUDE: .*src/.*`
|
- Lint the `src` folder in the root of the repository:
|
||||||
- Do not lint files inside test folder: `FILTER_REGEX_EXCLUDE: .*test/.*`
|
`FILTER_REGEX_INCLUDE: ^src/`
|
||||||
- Do not lint JavaScript files inside test folder:
|
- Lint all `src` folders in the repository: `FILTER_REGEX_INCLUDE: (^|/)src/`
|
||||||
`FILTER_REGEX_EXCLUDE: .*test/.*.js`
|
- Do not lint files inside `test` folder in the root of the repository:
|
||||||
|
`FILTER_REGEX_EXCLUDE: ^test/`
|
||||||
|
- Do not lint files inside all `test` folders in the repository:
|
||||||
|
`FILTER_REGEX_EXCLUDE: (^|/)test/`
|
||||||
|
- Do not lint JavaScript files inside `test` folder in the root of the
|
||||||
|
repository: `FILTER_REGEX_EXCLUDE: ^test/[^/]+\.js$`
|
||||||
|
- Do not lint JavaScript files inside `test` folder in the root of the
|
||||||
|
repository (recursively): `FILTER_REGEX_EXCLUDE: ^test/.+\.js$`
|
||||||
- Do not lint files named `gradlew` and JavaScript files inside a specific
|
- Do not lint files named `gradlew` and JavaScript files inside a specific
|
||||||
directory: `.*/gradlew|.*/specific/directory/*.js`
|
directory:
|
||||||
|
`FILTER_REGEX_EXCLUDE: ((^|/)gradlew|^specific/directory/[^/]+\.js)$`
|
||||||
|
|
||||||
<!-- This `README.md` has both markers in the text, so it is considered not generated. -->
|
<!-- This `README.md` has both markers in the text, so it is considered not generated. -->
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue