Repository navigation
chore: Ignore VSC (non-)JSON in pre-commit - #10
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR configures pre-commit hooks to ignore VSCode configuration files from JSON validation and formatting checks. VSCode's JSON files often contain comments and non-standard JSON features that cause validation failures.
- Added exclude patterns for
.vscode/*.jsonfiles in bothcheck-jsonandpretty-format-jsonhooks - Included reference comments linking to the relevant GitHub issue explaining the rationale
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Summary of ChangesHello @vorburger, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines the project's pre-commit hook configuration by introducing exclusions for JSON files generated or managed by Visual Studio Code. The primary goal is to prevent these editor-specific files from triggering validation or formatting errors during pre-commit checks, thereby streamlining the development workflow and focusing pre-commit efforts on application-specific code. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly excludes VS Code's JSON-with-comments files from pre-commit JSON validation and formatting hooks. However, there are several indentation inconsistencies introduced in the .pre-commit-config.yaml file. I've left comments with suggestions to fix the indentation for better readability and to adhere to common YAML styling conventions.
| # https://github.com/pre-commit/pre-commit-hooks/issues/1196 | ||
| exclude: ^\.vscode/.*\.json$ |
There was a problem hiding this comment.
The indentation of the comment on line 9 is inconsistent with the exclude key it refers to on line 10. For better readability and to follow common YAML style, the comment should be aligned with the configuration key.
# https://github.com/pre-commit/pre-commit-hooks/issues/1196
exclude: ^\.vscode/.*\.json$| # https://github.com/pre-commit/pre-commit-hooks/issues/1196 | ||
| exclude: ^\.vscode/.*\.json$ |
There was a problem hiding this comment.
Similar to the previous point, the indentation of the comment on line 24 is inconsistent with the exclude key on line 25. Please align the comment with the configuration key for consistency.
# https://github.com/pre-commit/pre-commit-hooks/issues/1196
exclude: ^\.vscode/.*\.json$| - id: nixfmt-nix | ||
|
|
||
| # https://editorconfig.org check should run AFTER all of the formatters (above) | ||
| # https://editorconfig.org check should run AFTER all of the formatters (above) |
There was a problem hiding this comment.
The indentation of this comment has been increased, which makes it seem like it belongs to the nixfmt-nix hook. Since this comment refers to the next repository definition (editorconfig-checker.python), it should be at the root level (0 indentation) to clarify that it's a top-level comment between repository definitions.
# https://editorconfig.org check should run AFTER all of the formatters (above)
No description provided.