Add MagicNumberCheck detector with unit and team-scale tests#51
Closed
aliyahnurdafika wants to merge 2 commits intodevfrom
Closed
Add MagicNumberCheck detector with unit and team-scale tests#51aliyahnurdafika wants to merge 2 commits intodevfrom
aliyahnurdafika wants to merge 2 commits intodevfrom
Conversation
AdaraPutri
reviewed
Jan 26, 2026
Collaborator
There was a problem hiding this comment.
hey Aliyah, could you add a brief description of what the "MagicNumber" violation is here? thanks!
Collaborator
Author
|
Hi everyone, just a quick update. I’m pivoting away from the patch-snippet-based approach and will continue the MagicNumber work using full-file enrichment for better context. |
Collaborator
|
Sounds good. I would close this PR and open a new PR when the new feature is ready. |
Collaborator
Author
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
Implements the first violation detector: MagicNumberCheck, designed to be testable and safe on real GitHub diff data.
What’s included
src/violations/magic_number_check.pysrc/violations/__init__.pytest/test_magic_number_check.py(controlled unit tests on synthetic snippets)test/test_magic_number_team15_patch_fixture.py(single real Team 15 patch_snippet fixture)test/test_magic_number_team_scaled_csv.py(iterates all Team 15 patch_snippet rows from CSV viaMAGIC_NUMBER_PATCH_CSV)How to test
Notes:
@@ -a,b +c,d @@) are not treated as code.documentation/violations.md) will be submitted in a separate PR as requested.