mirror of
https://github.com/renovatebot/pre-commit-hooks.git
synced 2026-04-15 02:54:46 +00:00
multiple configuration iterator
This commit is contained in:
parent
293a152f1e
commit
575b2a5d99
2 changed files with 24 additions and 0 deletions
|
|
@ -5,3 +5,12 @@
|
||||||
additional_dependencies: [renovate@32.105.2]
|
additional_dependencies: [renovate@32.105.2]
|
||||||
entry: renovate-config-validator
|
entry: renovate-config-validator
|
||||||
files: '(^|/).?renovate(?:rc)?(?:\.json5?)?$'
|
files: '(^|/).?renovate(?:rc)?(?:\.json5?)?$'
|
||||||
|
- id: renovate-config-validator-iter
|
||||||
|
name: renovate-config-validator
|
||||||
|
description: Validate Renovate config
|
||||||
|
language: node
|
||||||
|
additional_dependencies: [renovate@32.105.2]
|
||||||
|
entry: bash -c 'for f in ${@:0}; do renovate-config-validator $f; done'
|
||||||
|
files: '(^|/).?renovate(?:rc)?(?:\.json5?)?$'
|
||||||
|
require_serial: true
|
||||||
|
pass_filenames: true
|
||||||
|
|
|
||||||
15
README.md
15
README.md
|
|
@ -13,3 +13,18 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: renovate-config-validator
|
- id: renovate-config-validator
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can also use `renovate-config-validator-iter` in a project with multiple configurations by listing the configurations in the [files](https://pre-commit.com/#hooks-files) field
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
repos:
|
||||||
|
- repo: github.com/renovatebot/pre-commit-hooks
|
||||||
|
rev: 32.105.2
|
||||||
|
hooks:
|
||||||
|
- id: renovate-config-validator
|
||||||
|
files: |
|
||||||
|
(?x)^(
|
||||||
|
(^|.*/).?renovate(?:rc)?(?:\.json5?)?$|
|
||||||
|
^default\.json
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue