Skip to content

Express app.get() config getter misidentified as route #7

@DeusData

Description

@DeusData

Problem

Express.js `app.get('setting')` (config getter with 1 argument) is misidentified as a route registration. This creates false positive Route nodes.

Example: `app.get('env')` returns the environment setting, not a GET route at `/env`.

Root Cause

The route detection in the HTTP link pipeline doesn't check argument arity. Express `app.get()` with 1 argument is a config getter; with 2+ arguments it's a route registration.

Fix

In the Express route detection logic:

  1. Check if `app.get()` has 2+ arguments (path + handler) — this is a route
  2. If it has only 1 argument — this is a config getter, skip it

Test Repo

express-js: any Express.js project with `app.get('env')` or similar config calls.

Impact

Eliminates false positive routes in JavaScript/Express projects. Currently JS scores 50% — this fix removes noise from route queries.

References

  • Benchmark report: `BENCHMARK_REPORT.md` (JavaScript section)
  • HTTP link pipeline: `internal/httplink/`

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions