pre-commit: remove markdown-link-check hook#6742
Conversation
External link checkers are inherently flaky in CI due to websites blocking automated requests (e.g. 403 errors). Also remove JSON hooks (pretty-format-json, check-json) since no JSON files remain in the repository. Co-authored-by: Claude <[email protected]>
Summary of ChangesHello, 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 aims to enhance the stability and efficiency of the CI pipeline by removing pre-commit hooks that were either causing intermittent failures or were no longer necessary. By streamlining these checks, the change reduces build flakiness and optimizes the development workflow, ensuring a smoother and more reliable code integration process. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
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 removes the markdown-link-check pre-commit hook and its associated configuration due to flakiness. While this resolves the CI failures, I've suggested an alternative approach: instead of removing the link checker entirely, consider updating its configuration to ignore the specific domains causing issues. This would preserve the value of the link checker for other links. If this suggestion is adopted, the related JSON formatting hooks should also be retained.
I am having trouble creating individual review comments. Click here to see my feedback.
.pre-commit-config.yaml (110-119)
Instead of completely removing the markdown-link-check hook, have you considered updating its configuration to ignore the links that are causing flaky failures?
The PR description mentions failures from doxygen.nl. You could add this domain to the ignorePatterns in .github/linters/mlc_config.json. This would fix the flakiness while keeping the benefit of checking for other broken links in markdown files.
For example, you could add the following to ignorePatterns in .github/linters/mlc_config.json:
{
"pattern": "^https://www.doxygen.nl/"
}If you adopt this suggestion, you should also revert the removal of the pretty-format-json and check-json hooks, as the JSON configuration file for markdown-link-check would remain in the repository.
Co-authored-by: Claude <[email protected]>
Summary
markdown-link-checkpre-commit hook which causes flaky CI failures due to external websites blocking automated requests (e.g. 403 from doxygen.nl).github/linters/mlc_config.jsonpretty-format-jsonandcheck-jsonhooks since no JSON files remain tracked in the repositoryTest plan
check-hooks-applymeta-hook passes (no dead hooks)