feat: lake: read recorded code quality metrics in lake lint - #14862
Open
wkrozowski wants to merge 1 commit into
Open
feat: lake: read recorded code quality metrics in lake lint#14862wkrozowski wants to merge 1 commit into
lake lint#14862wkrozowski wants to merge 1 commit into
Conversation
|
Mathlib CI status (docs):
|
Collaborator
|
Reference manual CI status:
|
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.
This PR makes
lake lint --code-qualityemit the code quality entries recorded during elaboration (viaLean.Linter.logCodeQualityEntry) alongside the linter-derived and package-check ones. Recorded entries are now attributed to the linter option that produced them, so--lint-onlyrestricts them in the same way as ordinary linter warnings.Lean.Linter.logCodeQualityEntrynow takes the producing linter's option and tags its message with the option name, mirroringlogLint.Lean.Linter.recordLintspersists that name together with the entry incodeQualityLogExt(as the newCodeQualityLogEntry) and drops entries that carry no linter tag.lake lintrecovers the entries from the.oleans of each lint target's package modules without re-elaboration, filters them under--lint-onlyvia the recorded linter name, and collects a module's entries only once when it appears in several targets' import closures.