Skip to content

Offer suppression quick fixes for errors - #58

Merged
ViTeXFTW merged 1 commit into
devfrom
t3code/49ffb67d
Jul 18, 2026
Merged

Offer suppression quick fixes for errors#58
ViTeXFTW merged 1 commit into
devfrom
t3code/49ffb67d

Conversation

@ViTeXFTW

Copy link
Copy Markdown
Owner

What changed

  • offer the zerosyntax-disable quick fix for error diagnostics as well as warnings and hints
  • retain the intentional exclusion for the unknown-suppression typo hint
  • update the spec-first regression coverage and diagnostics documentation

Why

The shared quick-fix dispatcher explicitly filtered out Severity::Error, so only some diagnostic types could add a file-level disable pragma. Removing that gate makes the existing shared suppression action available consistently.

Impact

Users can suppress any error or warning code from the editor's quick-fix menu instead of editing the pragma manually.

Validation

  • cargo fmt --all -- --check
  • cargo test
  • git diff --check

@greptile-apps

greptile-apps Bot commented Jul 18, 2026

Copy link
Copy Markdown

Greptile Summary

This PR makes suppression quick fixes available for error diagnostics too. The main changes are:

  • Removed the severity gate from the shared diagnostic quick-fix dispatcher.
  • Kept unknown-suppression excluded from suppression quick fixes.
  • Updated the quick-fix regression spec for bad-bool errors.
  • Updated diagnostics docs to describe suppressing any diagnostic code.

Confidence Score: 5/5

Safe to merge with minimal risk.

The code change is narrowly scoped to the existing suppression quick-fix path, and the updated tests cover the intended error-diagnostic behavior.

No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex ran the requested contract verification as part of the pull request review.
  • T-Rex noted that local artifact references were not uploaded with the verification results.

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
crates/analysis/src/actions.rs Removes the severity gate from suppression quick-fix dispatch while preserving de-duplication and the unknown-suppression exclusion.
crates/analysis/tests/spec/QuickfixSuppress.ini Updates the fixture comment to match the new bad-bool suppression behavior.
crates/analysis/tests/spec/QuickfixSuppress.spec.toml Changes the quick-fix expectation for bad-bool from no suppression offer to a suppression offer.
docs/diagnostics.md Documents that suppressions apply to any diagnostic code while still recommending fixes for error-level issues.

Reviews (1): Last reviewed commit: "Offer suppression quick fixes for errors" | Re-trigger Greptile

@ViTeXFTW
ViTeXFTW marked this pull request as ready for review July 18, 2026 14:24
@ViTeXFTW
ViTeXFTW merged commit d92d297 into dev Jul 18, 2026
5 checks passed
ViTeXFTW added a commit that referenced this pull request Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant