fix(health): suppress primitive obsession in tiny modules#313
Merged
Conversation
A wide parameter list in a very small module (under 60 non-blank lines) is almost always an idiomatic config/builder/forwarder entry point, not a value object waiting to be extracted. Firing the primitive_obsession smell there flags clean small utility files and adds noise without predictive value. Gate the detector on a minimal file size so the smell only fires where it carries signal. Scoring weights, categories and caps are unchanged; larger modules and the per-function parameter logic behave exactly as before. Adds a regression test for the tiny-file suppression and updates the existing cases to substantial modules.
swati510
approved these changes
May 29, 2026
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.
A wide parameter list in a very small module (under 60 non-blank lines) is almost always an idiomatic config/builder/forwarder entry point, not a value object waiting to be extracted. Firing the
primitive_obsessionsmell there flags clean small utility files and adds noise without predictive value.This gates the detector on a minimal file size so the smell only fires where it carries signal.
Scope
Validation
primitive_obsessionfiring on small files is anti-predictive (it flags clean small utility files), inverting discrimination on the small-file size band. Suppressing it there improves that band and leaves overall discrimination and cost-effectiveness unchanged — a precision/noise fix with no regression.