Where rules come from
Read from code
Most rules come straight from your codebase - found during a code scan and anchored to the file and symbol that enforces them, with the enforcing snippet attached so you can see the ground truth.
Promoted from an issue
A confirmed issue that isn’t grounded in code yet can be promoted into a rule of its own - so Glassray starts watching for it even before the code catches up. A promoted rule is marked “not in code” until a later scan finds the matching code, or you merge it into one that already exists.
Watched vs. archived
A rule is either watched or archived:- Watched - judged on every trace. A trace that breaks it surfaces as an issue.
- Archived - retired. No longer judged, and its backing issues return to the unmatched pool.
Keeping rules and issues in sync
An issue is always found against a rule, but the two can drift apart - an issue Glassray couldn’t confidently match to one of your existing rules shows up as unmatched. From there you can:- Link it to an existing rule it actually violates, instead of leaving it stranded.
- Promote it into a new rule, if it’s a real behaviour nothing currently covers.
- Dismiss it as noise, if it isn’t a real behaviour at all.