Conversation
There was a problem hiding this comment.
Pull request overview
This PR restructures the repository’s prek configuration by removing the prior per-language Python package/docs layout and switching pre-commit hook definitions to invoke prek with standalone YAML configs.
Changes:
- Removed ruff configuration and deleted various language-specific
prek/*README +__init__.pyfiles - Added standalone prek config YAMLs (e.g.,
prek/general-hooks.yaml,prek/python-hooks.yaml) - Updated
.pre-commit-hooks.yamlhooks to runprek run --config ...
Reviewed changes
Copilot reviewed 16 out of 18 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Removes ruff configuration from the repository |
| prek/python/init.py | Removes package marker / noqa shim |
| prek/python/README.md | Removes per-language prek documentation (consolidated elsewhere) |
| prek/python-hooks.yaml | Adds Python-oriented prek hook configuration (ruff/mypy/blacken-docs) |
| prek/lua/init.py | Removes package marker / noqa shim |
| prek/lua/README.md | Removes per-language prek documentation (consolidated elsewhere) |
| prek/latex/init.py | Removes package marker / noqa shim |
| prek/latex/README.md | Removes per-language prek documentation (consolidated elsewhere) |
| prek/general/init.py | Removes package marker / noqa shim |
| prek/general/README.md | Removes per-language prek documentation (consolidated elsewhere) |
| prek/general-hooks.yaml | Adds general-purpose prek hook configuration (linting/formatting checks) |
| prek/init.py | Removes package marker / noqa shim |
| prek/README.md | Consolidates usage + spellchecking documentation |
| .renovaterc.json5 | Updates Renovate pattern to match new prek/*-hooks.yaml layout |
| .pre-commit-hooks.yaml | Switches hook entries to run prek with new config YAMLs |
| .pre-commit-config.yaml | Updates the pinned revision of this repo for consumers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - id: general-hooks | ||
| name: General hooks | ||
| description: Default prek hooks for general repos | ||
| entry: prek run --config prek/general-hooks.yaml --all-files | ||
| language: python |
There was a problem hiding this comment.
pre-commit will append a list of filenames to entry by default. Since the command already uses --all-files, consider adding pass_filenames: false (for each of these hooks), or alternatively drop --all-files and let pre-commit provide the file list. This avoids redundant args and prevents potential CLI-arg conflicts.
| languages. | ||
| In a repository that requires [prek](https://github.com/j178/prek), simply add a | ||
| file called `.pre-commit-config.yaml` with the following code. Some hooks are | ||
| only relevant for certain files types. |
There was a problem hiding this comment.
Typo: change 'files types' to 'file types'.
| only relevant for certain files types. | |
| only relevant for certain file types. |
| extend-ignore-re = [ | ||
| # Custom ignore regex patterns: | ||
| # https://github.com/crate-ci/typos/blob/master/docs/reference.md#example-configurations | ||
| ".*(?:#|--|//|/*).*(?:typos):\\s?ignore[^\\n]*\\n", |
There was a problem hiding this comment.
In the TOML regex example, /* is interpreted in regex as / quantified by * (i.e., 'zero or more /'), not a literal /*. To match a C-style block comment start, escape the * (e.g., use /\\* in the regex; in a TOML basic string that typically means writing /\\\\*).
| ".*(?:#|--|//|/*).*(?:typos):\\s?ignore[^\\n]*\\n", | |
| ".*(?:#|--|//|/\\*).*(?:typos):\\s?ignore[^\\n]*\\n", |
This reverts commit 18b5035.
No description provided.