Fix pre-commit top-level exclude regex broken by YAML block scalar trailing newline#3425
Conversation
Co-authored-by: juliusvonkohout <45896133+juliusvonkohout@users.noreply.github.com> Agent-Logs-Url: https://github.com/kubeflow/manifests/sessions/7bc9cd3a-d1b3-416a-be8b-19087f67c814
|
Welcome to the Kubeflow Manifests Repository Thanks for opening your first PR. Your contribution means a lot to the Kubeflow community. Before making more PRs: Community Resources:
Thanks again for helping to improve Kubeflow. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
Updates the repository’s pre-commit configuration so the global exclude regex correctly excludes upstream/ paths for hooks that do not define their own exclude.
Changes:
- Replace the top-level
excludeYAML block scalar with a single-line quoted scalar to avoid an implicit trailing newline in the regex.
* Refine .yamllint.yaml configuration settings Updated .yamllint.yaml configuration options for clarity and consistency. Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * Update linting_bash_python_yaml_files.yaml Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * Update .pre-commit-config.yaml Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> * fix yamllint workflow and refresh versions (#3423) * test: refresh yamllint tooling Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * Update .github/workflows/linting_bash_python_yaml_files.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: hippie-danish <133037056+danish9039@users.noreply.github.com> * test: install yamllint on PATH Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> * test: keep yamllint exclusions in config Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> --------- Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> Signed-off-by: hippie-danish <133037056+danish9039@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix pre-commit top-level exclude regex broken by YAML block scalar trailing newline (#3425) * Initial plan * Fix top-level exclude block scalar in .pre-commit-config.yaml Co-authored-by: juliusvonkohout <45896133+juliusvonkohout@users.noreply.github.com> Agent-Logs-Url: https://github.com/kubeflow/manifests/sessions/7bc9cd3a-d1b3-416a-be8b-19087f67c814 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: juliusvonkohout <45896133+juliusvonkohout@users.noreply.github.com> --------- Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com> Signed-off-by: danish9039 <danishsiddiqui040@gmail.com> Signed-off-by: hippie-danish <133037056+danish9039@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: hippie-danish <133037056+danish9039@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
The top-level
excludein.pre-commit-config.yamlused a YAML block scalar (|), which silently appends a trailing\nto the regex string. pre-commit compiles this verbatim, so the pattern never matched any file path, leavingupstream/paths unexcluded for hooks without their ownexclude.Change
Convert
excludefrom block scalar to a single-line quoted scalar:⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.