fix: clear hand-written validate --all violations, correct the mo:base check - #357
Open
marc0olo wants to merge 1 commit into
Open
fix: clear hand-written validate --all violations, correct the mo:base check#357marc0olo wants to merge 1 commit into
marc0olo wants to merge 1 commit into
Conversation
…e check Replaces two em-dashes in prose, and fixes the mo:base rule so it matches imports (mo:base/) inside code fences instead of legitimate prose mentions of the legacy library in base-to-core migration tables.
|
🤖 Here's your preview: https://mmsik-fiaaa-aaaam-ahq7a-cai.icp0.io |
2 tasks
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
npm run validate(--all) reported 11 errors onmain. This clears the 4 that are in hand-written pages. The remaining 7 are in a synced file and are tracked in #356.data-persistence.mdx,chain-key-tokens.mdx)mo:basecheck corrected inscripts/validate.jsWhy the
mo:basecheck changedcheckForbiddenPatternsskips fenced code, so the old/mo:base/pattern could only ever match prose. That is backwards for this rule:import Buffer "mo:base/Buffer";lives inside a fence and was never flagged;mainwere the base-to-core migration table indata-persistence.mdx("Use these in preference to the legacymo:baseequivalents", and theReplaces (mo:base)column header), which is the same mapping AGENTS.md itself spells out.The rule now matches the import path
mo:base/and opts into fence checking via a per-ruleincludeFencesflag, so the other two patterns keep their prose-only behaviour.Verified both directions:
with the fixture containing an import inside a fence plus a prose mention; only the import is reported. A scan of
docs/confirms there are nomo:base/imports being missed today.Verification
npm run validategoes from 11 errors to 7 (all 7 indocs/references/internet-identity-spec.md, synced fromdfinity/internet-identity, see #356).npm run buildpasses.