fix: surface .lashignore and explain the linter's own codes (#58) - #59
Merged
Conversation
The W_INDEX_ORPHAN message, both --help surfaces and the docs now name .lashignore, and `lash explain` knows every code lint emits.
rustdoc -D warnings rejects a public doc linking to a private method.
Merged
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.
Closes #58.
Two discoverability failures from the report, both ending at the same place: the user is looking at a diagnostic and the thing that resolves it is documented somewhere they are not.
.lashignoreIt already worked — honoured by both walkers, tested, used by this repo — and was reachable from nothing a user reads when a
content/directory starts reportingW_INDEX_ORPHANonce per file.... is not referenced in the root index (add it to .lashignore if it is not a task file). The pointer is in the message rather than only thehelpfield because help surfaces only under-v, and one warning per file is exactly when the escape hatch has to be on screen.lash lint --helpand the top-levellash --helpdescribe file discovery (.gitignore+.lashignore).docs/user-guide.mdanddocs/error-codes.mdeach document it.lash explainlash explain W_INDEX_ORPHANandlash explain E_LINK_NOT_FOUNDanswered "Unknown error code" — the linter's per-rule codes were never connected to the explanation table (theE_LINT_*entries predate them).E_SEM_DESC_TOO_LONGandE_NOTE_EXCESSIVE_LENGTH, which only appear at a different severity and so are invisible to a rule'scode(). Also added genericE_PARSE, which lint emits directly.register_default_rulesand fails if any rule's code has no explanation, so a new rule cannot reintroduce the gap.explain --listwas silently dropping every code its if-else prefix chain did not match — allW_andI_codes. Replaced with a prefix table plus an explicit "Other Codes" fallback. Order matters:E_INDEX_FILE_MISSINGis a cross-file rule, not a database error.Warning:/Info:instead ofError:.lash explaininvocation for it — picking a codeexplainactually knows, so the hint can't create the dead end it exists to prevent.error_explanations.rswas split into a module directory (parse / syntax / semantic / crossfile / runtime / creation, mirroring the--listgrouping); it was already past the repo's 500-line guideline and this change nearly doubled it.Verification
Reproduced the report end to end:
content/a-post.mdwarns with the.lashignorepointer,printf 'content/\n' > .lashignoreclears it, andlash explain W_INDEX_ORPHANnow answers. Full suite, doctests, clippy-D warningsandcargo fmt --checkpass; lint/agent-prompt snapshots updated for the new message and footer.