Skip to content

pre-commit: remove markdown-link-check hook#6742

Merged
matz merged 2 commits intomasterfrom
fix/remove-markdown-link-check
Mar 12, 2026
Merged

pre-commit: remove markdown-link-check hook#6742
matz merged 2 commits intomasterfrom
fix/remove-markdown-link-check

Conversation

@matz
Copy link
Member

@matz matz commented Mar 12, 2026

Summary

  • Remove markdown-link-check pre-commit hook which causes flaky CI failures due to external websites blocking automated requests (e.g. 403 from doxygen.nl)
  • Remove its config file .github/linters/mlc_config.json
  • Remove pretty-format-json and check-json hooks since no JSON files remain tracked in the repository

Test plan

  • Verify pre-commit CI workflow passes without markdown-link-check
  • Verify check-hooks-apply meta-hook passes (no dead hooks)

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]>
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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

  • Pre-commit Hook Removal: Removed the markdown-link-check pre-commit hook to address flaky CI failures caused by external websites blocking automated requests.
  • Configuration Cleanup: Deleted the associated configuration file .github/linters/mlc_config.json for the removed markdown link checker.
  • JSON Hook Removal: Eliminated pretty-format-json and check-json pre-commit hooks as there are no longer any JSON files tracked in the repository.

🧠 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
  • .github/linters/mlc_config.json
    • Removed the entire configuration file.
  • .pre-commit-config.yaml
    • Removed pretty-format-json and check-json hooks from the default checks.
    • Removed the markdown-link-check repository and its associated hook definition.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

medium

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.

Copy link
Contributor

@jbampton jbampton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove the '**/*.json' from prettier pre-commit:

entry: prettier --write '**/*.json' '**/*.md' '**/*.yaml' '**/*.yml'

@matz matz merged commit 12af8f5 into master Mar 12, 2026
27 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants