Fix ci precommit md060#40
Merged
Merged
Conversation
nixpkgs' pre-commit derivation runs its own upstream pytest suite in checkPhase, and test_output_isatty forks a pty-backed subprocess that is racy under the sandboxed, multi-threaded macOS builders (see the 'use of fork() may lead to deadlocks' DeprecationWarning in the test output). It fails intermittently on macos-latest CI runners even though the built pre-commit binary works fine, and is not caused by any change in this repo: the same nixpkgs-4.5.1 derivation succeeded in other jobs of the same CI run. Override pkgs.pre-commit on darwin to add that one test to disabledTests (matching the pattern nixpkgs itself already uses for other known-broken darwin tests), and pass the override to git-hooks.lib.run via its package option. Linux is left untouched. Safe to drop once upstream disables or fixes the test in pkgs/by-name/pr/pre-commit/package.nix.
MD060 (table-column-style) has no config value that means 'ignore table width' -- even the default 'any' style still requires every table to consistently match one of three fixed padding conventions (aligned/compact/tight) and reports violations against whichever is the closest match. Disable it outright so hand-edited/ragged table widths never fail the build. Disabling MD060 alone isn't enough: prettier defaults to write=true here and always re-pads GFM tables to its own 'aligned' style, with no config knob to leave tables alone (a long-standing open upstream feature request). In a CI-only setup with no local pre-commit hook installed, that rewrite is an invisible diff contributors can only find by digging through the CI build log, so it looks like an opaque failure for something markdownlint no longer cares about. Exclude markdown from the prettier hook entirely; markdownlint is check-only (no --fix) and its default ruleset already flags the same style concerns (emphasis style, bullet markers, blank lines, ...) as a named, actionable rule failure instead of a silent rewrite.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe changes adjust Markdown formatting hooks and customize the pre-commit package used by Darwin checks. ChangesPre-commit adjustments
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by CodeRabbit
Bug Fixes
Chores