Problem
The renovate-config-validator hook will not run natively on renovate.jsonc files because the files regex does not match this file suffix. Per https://docs.renovatebot.com/configuration-options/ and renovatebot/renovate#43677, .jsonc files should be natively supported.
Steps to Reproduce
Create a basic renovate.jsonc file:
Create a basic .pre-commit-config.yaml:
repos:
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 43.256.1
hooks:
- id: renovate-config-validator
Run pre-commit, see that the .jsonc file is skipped:
❯ pre-commit run renovate-config-validator --files renovate.jsonc --verbose
renovate-config-validator............................(no files to check)Skipped
- hook id: renovate-config-validator
Proposed Solution
Update the file regex to support .jsonc
|
files: '(^|/).?renovate(?:rc)?(?:\.json5?)?$' |
Problem
The
renovate-config-validatorhook will not run natively onrenovate.jsoncfiles because thefilesregex does not match this file suffix. Per https://docs.renovatebot.com/configuration-options/ and renovatebot/renovate#43677,.jsoncfiles should be natively supported.Steps to Reproduce
Create a basic
renovate.jsoncfile:{ // Minimal JSONC Renovate config. "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": ["config:recommended"] }Create a basic
.pre-commit-config.yaml:Run pre-commit, see that the
.jsoncfile is skipped:Proposed Solution
Update the file regex to support
.jsoncpre-commit-hooks/.pre-commit-hooks.yaml
Line 9 in b13b759