You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P2] Ignore route-looking text in comments and string literals #178
Verified in current Development source (audit base 852b98e; merged #161 affects only CLI scan Markdown).
Problem
Route detection applies regexes directly to full source text. A commented-out app.get('/retired', ...) or string containing that text is emitted as an active Express route; decorator examples in Python strings/comments have the same problem.
Reproduction: Create a selected source file containing commented-out routes and a real route, then inspect route output.
Acceptance criteria
Detect executable route declarations while excluding comments and inert strings. Add regressions for Express and decorator-based routes. This is distinct from #139's Next.js route normalization.
Request assignment before opening a focused PR against Development.
Hi @Sandesh13fr, I'd like to work on this issue as part of Open Source Connect India 2026.
I can work on updating the route detection logic to ignore commented-out routes and route-looking text inside string literals, along with adding the required regression tests.
Assigned based on your proposed approach. Please keep each fix focused on its assigned issue and include regression tests. Submit these sequentially: only one open PR per account at a time, and reference the assigned issue with Fixes #<issue-number>.
Hi! I've opened PR #217 to address this issue: #217
The fix ignores route-looking text inside comments and string literals during route detection. I've also added regression tests for Express and Python route detection.
Validation: All 78 tests passed across 8 test files.
Hi @Sandesh13fr, I investigated the failing CI checks. The two failures in apps/cli/tests/catalogCommand.test.ts are reproducible on the upstream Development branch after building the workspace. Both fail because catalogs/models.json is 102 days old, exceeding the 90-day freshness limit. My PR only changes route detection and does not modify the CLI or catalog files. Could you confirm whether this baseline issue should be addressed separately?
Activity
kspraveen-07 commentedon Oct 6, 2026
Hi @Sandesh13fr, I'd like to work on this issue as part of Open Source Connect India 2026.
I can work on updating the route detection logic to ignore commented-out routes and route-looking text inside string literals, along with adding the required regression tests.
Could you please assign this issue to me?
Sandesh13fr commentedon Oct 6, 2026
Assigned based on your proposed approach. Please keep each fix focused on its assigned issue and include regression tests. Submit these sequentially: only one open PR per account at a time, and reference the assigned issue with
Fixes #<issue-number>.kspraveen-07 commentedon Oct 19, 2026
Hi! I've opened PR #217 to address this issue: #217
The fix ignores route-looking text inside comments and string literals during route detection. I've also added regression tests for Express and Python route detection.
Validation: All 78 tests passed across 8 test files.
Thank you!
kspraveen-07 commentedon Oct 29, 2026
Hi @Sandesh13fr, I investigated the failing CI checks. The two failures in
apps/cli/tests/catalogCommand.test.tsare reproducible on the upstreamDevelopmentbranch after building the workspace. Both fail becausecatalogs/models.jsonis 102 days old, exceeding the 90-day freshness limit. My PR only changes route detection and does not modify the CLI or catalog files. Could you confirm whether this baseline issue should be addressed separately?