feat: fix the derivable content findings with content:lint --fix - #586
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 5 Skipped Deployments
|
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe content linter adds ChangesContent lint autofix
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Contributor
participant ContentLintCLI
participant Fixer
participant ContentScanner
participant MarkdownFile
Contributor->>ContentLintCLI: run --fix or --dry-run with paths
ContentLintCLI->>Fixer: apply deterministic fixes
Fixer->>MarkdownFile: read and transform content
ContentLintCLI->>ContentScanner: rescan against corpus baseline
ContentScanner-->>ContentLintCLI: return findings and score
ContentLintCLI->>MarkdownFile: write accepted changes
ContentLintCLI-->>Contributor: report applied, reverted, or dry-run results
Possibly related PRs
Suggested labels: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thank you for following the naming conventions! 🙏 |
b91f286 to
4864be0
Compare
commit: |
4864be0 to
0305dee
Compare
0305dee to
7379af4
Compare
a07fc8b to
dc67b66
Compare
dc67b66 to
0f7e345
Compare
Stacked on #585.
Some content findings have exactly one correct fix. This applies those, so a reviewer never spends a dispatch on an em dash.
What is derivable, and what is not
A rule reaches
lib/fix.mjsonly when the corrected text follows from the rule rather than from taste.T-15evlog/shared→evlog/toolkit,evlog/browser→evlog/httpU-15sink→drain,error registry→error catalogchild logger, which does not slot into the same sentenceU-16U-14A — B — C→A, B, CT-13is absent on purpose: deleting "Here's a breakdown of" leaves "what makes it special:".On the corpus as it stands that is 51 fixes across 26 files. The two
evlog/browseroccurrences in the docs are both documenting the deprecation, and both are skipped.Why it is safe to run unattended
Every file is re-scanned after writing. If the score dropped or a new finding id appeared, the file is reverted and reported as unfixed.
The check is deliberately not "the finding cleared":
U-14andU-15are reported once per page, so removing one of four dashes leaves the finding standing and still helped. What must hold is that nothing got worse and nothing new appeared. That logic isisSafeFix, tested on its own.--fixrefuses to run without explicit paths. A corpus-wide rewrite is a maintainer's decision.Checks
20 new tests, 87 total in
content:lint:test. No changeset:scripts/only.Summary by CodeRabbit
New Features
Documentation
Tests