Repository navigation
Add amber-lsp check with library lint rules - #54
Open
crimson-knight wants to merge 3 commits into
Open
crimson-knight wants to merge 3 commits into
crimson-knight wants to merge 3 commits into
Conversation
Fifteen library/* rules, run through a new check command scoped to changed lines, with carried-in code handling and advisory mode. A changed private, protected, or :nodoc: method is reached through its public callers, which must carry a golden, at-the-boundary, and just-past-the-boundary describe.
This was referenced Nov 9, 2026
The check runner applied every rule to every file, so source-only rules reported on specs. It now honors applies_to, anchored to the project root. Collar matching compared only the selector, so one collared #perform cleared every changed perform. A describe now has to name the method's owner, or name no type at all. Changed-line selection went silently empty for a root below the git top level, quoted file names, and diff.noprefix. A malformed exclude_patterns crashed the check and now exits 2.
A describe naming Sample::Widget was credited to a changed Other::Sample::Widget method, because the name matched as a suffix of the owner. Only an unqualified name now matches as a suffix.
crimson-knight
added a commit
to amberframework/micrate
that referenced
this pull request
Nov 10, 2026
--advisory keeps findings non-blocking, so job-level continue-on-error only hid a failed amber-lsp build or a checker exit 2. amber-lsp now builds from amberframework/amber_cli#54 at its reviewed head.
crimson-knight
added a commit
to crimson-knight/grant
that referenced
this pull request
Nov 10, 2026
--advisory keeps findings non-blocking, so job-level continue-on-error only hid a failed amber-lsp build or a checker exit 2. amber-lsp now builds from amberframework/amber_cli#54 at its reviewed head.
This branch has not been deployed
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.
What this adds
amber-lsp check, a repository linter for Crystal libraries, with 15library/*rules. It keeps findings on lines changed since a git ref, marks vendored code with--carried-in, and can run in advisory mode. These rules run only throughcheck, so editor diagnostics in Amber apps are unchanged.A changed method with a branch, loop, rescue, or raise needs a spec with a golden case, an
at the boundarycontext, and ajust past the boundarycontext. A private, protected, or:nodoc:method is reached through its public callers in the same type.Verification
crystal-alpha spec spec/amber_lsp: 468 examples, 0 failures, 0 errors, 0 pendingcrystal-alpha build src/amber_lsp.cr: zero warningsshard.ymlandshard.lockare unchanged.