Skip to content

Bug: relation markers accept duplicate requirement entries #2248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
haxtibal opened this issue May 15, 2025 · 0 comments
Open

Bug: relation markers accept duplicate requirement entries #2248

haxtibal opened this issue May 15, 2025 · 0 comments

Comments

@haxtibal
Copy link
Contributor

MarkerParser.parse will accept a marker like @relation(REQ-1, REQ-1, scope=function) from source code files. It simply constructs a FunctionRangeMarker with reqs=["REQ-1", "REQ-1"].

This can lead to errors in later processing stages, e.g. when FileTraceabilityIndex.validate_and_resolve does for req_ in function_marker_.reqs: traceability_index.graph_database.create_link(...).

It's rather hard to connect the later error to the original root cause. We should better prevent duplicate reqs entries in first place. Maybe use set instead of list, and print warning to user if duplicate entry is detected.

I added this bug as a reminder to myself, but everybody feel free to fix it :)

@stanislaw stanislaw added the Bug Something isn't working label May 15, 2025
@stanislaw stanislaw added this to the 2025-Q2 milestone May 15, 2025
@stanislaw stanislaw added Second roadmap and removed Bug Something isn't working labels May 15, 2025
@stanislaw stanislaw modified the milestones: 2025-Q2, 2025-Q3 Jun 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants