renovatebot / renovatebot/pre-commit-hooks
bug: renovate.jsonc files are skipped by config validator hook
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 49
- Forks
- 10
- Avg merge
- 1m
- Merged PRs (30d)
- 176
Description
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 https://github.com/renovatebot/renovate/pull/43677, .jsonc files should be natively supported.
Steps to Reproduce
Create a basic renovate.jsonc file:
{
// Minimal JSONC Renovate config.
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended"]
}
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
https://github.com/renovatebot/pre-commit-hooks/blob/b13b75918788a1dfe8fada6995adcab221087998/.pre-commit-hooks.yaml#L9
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at .pre-commit-hooks.yaml line 9, where the hook's files regex is defined. Run the reported pre-commit command against renovate.jsonc before and after the change. Done means the hook no longer reports no files to check and runs on the JSONC file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- yaml
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 90/100