Repository navigation
fix: make RequireIssuesResolved independent of ShowIssues - #84
Open
ehennestad wants to merge 2 commits into
Open
ehennestad wants to merge 2 commits into
ehennestad wants to merge 2 commits into
Conversation
codecheckToolbox threw MatBox:CodeIssues:UnresolvedIssues only when ShowIssues was also true. The throw sat inside the block that displays the issues table, and that block is skipped when ShowIssues is false, which is the default. A call with RequireIssuesResolved=true alone therefore never failed, including the example in the README. The same block held the "clear issues" for calls without an output, so with ShowIssues=false a call without a semicolon displayed the issues as ans. The display, the throw and the clear are now three separate steps. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Contributor
Test Results116 tests 115 ✅ 32s ⏱️ Results for commit 0a896a7. |
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.
matbox.tasks.codecheckToolboxdisplays the issues table, throwsMatBox:CodeIssues:UnresolvedIssuesand clears the unusedissuesoutput in one block. That block runs only whenShowIssuesis true, andShowIssuesdefaults to false.Problem
RequireIssuesResolved=truewithoutShowIssues=truenever throws, whateverSeverityThresholdis. The README example for failing on warnings uses exactly that call.ShowIssues=false, a call without an output and without a semicolon displays thecodeIssuesobject asans, including the issues table.Fix
The display, the throw and the clear are three separate steps:
ShowIssuesis true.RequireIssuesResolvedis evaluated againstSeverityThresholdregardless ofShowIssues. The threshold logic is unchanged.issuesis cleared whenever the function is called without an output.Behaviour change
A caller that passes
RequireIssuesResolved=truewithoutShowIssuesand has issues at or above the threshold passes today and fails after this change.Tests
TasksTestgets five tests that run the check on a temporary folder holding one file with one warning: the throw withRequireIssuesResolvedalone, the throw together withShowIssues, no throw when the only issue is belowSeverityThreshold, no throw with default options, and no issues displayed for a call without an output or a semicolon.🤖 Generated with Claude Code