fix: reduce high-volume precision false positives - #77
Merged
Conversation
alxxjohn
added a commit
that referenced
this pull request
Jul 28, 2026
🤖 I have created a release *beep* *boop* --- ## [1.3.3](v1.3.2...v1.3.3) (2026-07-28) ### Bug Fixes * reduce high-volume precision false positives ([cb19b29](cb19b29)) * reduce high-volume precision false positives ([#77](#77)) ([4cdd646](4cdd646)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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 reduces high-volume false positives from the v1.3.2 CodeGuard report by hardening precision detectors instead of adding waivers. It focuses
on React/React-hook boundaries, command functions that return useful results, duplicated-knowledge noise, persistence-boundary interpretation,
structural smell precision, and noisy TypeScript/JavaScript naming conventions.
What changed
Treats React components and named hooks as UI/state boundaries for hidden mutation and hidden side-effect checks.
Keeps nested non-hook functions reportable when they hide real persistence/collaborator mutation.
Allows command-style functions that write and return useful results, including create*, update*, upload*, notify*, record*, and submit*.
Filters duplicated-knowledge noise from small numeric literals and enum/status-style option strings.
Preserves duplicated-knowledge findings for stronger domain literals and larger domain-significant numbers.
Allows packages/api/src/** as an API/persistence implementation boundary.
Ignores persistence vocabulary that appears only in inline comments.
Suppresses message-chain noise from optional chaining, API response traversal, config traversal, and row/DTO mapper traversal.
Suppresses feature-envy noise for mapper/builder/formatter DTO-style reads from row, args, payload, etc.
Adds naming/cardinality allowances for common TypeScript/JavaScript conventions such as opts, message, className, Icon, submit, compare, parser,
answers, contracts, matters, risks, sections, and columns.
Splits duplicated-knowledge precision helpers into a dedicated file to keep quality_precision.go under design-size limits.
Tests
Added regression coverage for:
Validation
All passed.