primitive: correlation -- relate two patterns within a file #78
Labels
No labels
coordination/cross-repo
coordination/needed
effort
large
effort
medium
effort
small
meta/duplicate
meta/planning
meta/wontfix
priority
high
priority
low
priority
medium
session
blocker
session
handover
session
next
status
blocked
status
done
status
in-progress
status
review
status
to-go
type
admin
type/architecture
type
bug
type
config
type
deployment
type
docs
type/documentation
type
enhancement
type
feature
type
handover
type
infrastructure
type
installation
type
maintenance
type
migration
type
research
type
security
type/task
type/tech-debt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
DAW/fragjan#78
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Add a
correlationprimitive that can relate two patterns withinthe same file -- enabling rules like "if pattern A is present,
pattern B must also be present (or must not be present)".
Motivation
Current primitives check one thing at a time. Some findings require
relating two observations:
These cannot be expressed with the existing
patternprimitive alone.Concept
Notes
Long-term vision: fragjan learns to detect common function signatures
automatically across a codebase. This primitive is the foundation.
Automatic detection is a separate, later effort.
Related: no-reimplement rules (DAW/fragjan#76)
Acceptance Criteria
Spec: filecorrelation primitive
Primitive ID:
daw.fragjan.check.filecorrelationModule:
daw-modul-fragjan-check-filecorrelationLua require:
daw.fragjan.check.filecorrelationParameters
At least one of
must_match/must_not_matchis required.Semantics (file-level, not line-level)
if_matchno match ->skip(file not affected)if_matchmatches +must_matchmissing -> findingif_matchmatches +must_not_matchpresent -> findingExample
Related: DAW/fragjan#104 (next session priorities)
Implementation
Implemented as DAW/fragjan#105 (fragjan-check-filecorrelation 0.1.0).
The filecorrelation primitive covers file-level correlation between
two patterns. First rule using it: no-raw-sha256-popen (DAW/fragjan#77).
Note: more complex cases (reimpl alongside legitimate require) require
project-level analysis -- foundation for anagild integration.