Remove severity levels and add progress reporting - #1
Merged
Merged
Conversation
A full run gave no sign of life until the report printed. The runner now yields after each file and the CLI draws "Checking 12/42 files" on stderr, redrawn in place on a terminal and erased when done; off a terminal it prints one line announcing the run so CI logs and piped JSON stay clean. An offense is an offense, so `severity` and `--fail-on` are gone: every offense fails the run and is a GitHub error annotation. A config that still sets `severity` is rejected as an unknown key. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UhtJDjXrgmwwet27LAiY5f
The first real run flagged every lib file on "does every class or module
have a comment?", with probabilities of 0.09 to 0.41: the model read
"every" literally and counted the undocumented `module Lintus` wrapper.
The rule now asks about the offense ("is there a class without a
comment?") and its criteria say which classes to ignore. The starter
template gets the same treatment, and the README explains the two
lessons: ask about the offense, and name the unit and its exclusions.
The JSON output now lists, per file, the probability every rule gave
it, so a run can be read for confidence and not only for verdicts.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UhtJDjXrgmwwet27LAiY5f
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
This PR simplifies the linting model by removing rule severity levels and the
--fail-onflag, treating all offenses equally. It also adds progress reporting to show users how many files have been checked while a run is in flight.Key Changes
Removed severity concept: Rules no longer have a
severityfield (previouslyerrororwarning). All offenses are now treated equally for exit status purposes.severityanderror?fromRuleclass--fail-onCLI flag and related logicReport#exit_statusto return 1 if any offenses exist (previously differentiated by severity)Added progress reporting: New
Progressclass displays file checking progress on stderrwith_progresshelper that yields progress updates to the runnerConfiguration validation: Configs that still specify
severityin rules are now rejected with a clear error message naming the unknown keyUpdated documentation and examples: Removed all references to severity levels and
--fail-onfrom README, templates, and test fixturesImplementation Details
\r) on terminals to redraw in place, with proper width tracking to clear previous outputhttps://claude.ai/code/session_01UhtJDjXrgmwwet27LAiY5f