Skip to content

Tech detector counts vendored and build-output files, skewing language detection #150

Description

@ascherj

tech_detector.py does not exclude node_modules/ or build/ paths. A repo with 2 Python source files and 6 vendored/bundled JS files is reported as primarily JavaScript.

Steps to reproduce:

from agent.tools.tech_detector import TechDetector
t = TechDetector()
files = ['main.py','core/app.py','node_modules/lib/index.js','node_modules/lib/util.js','node_modules/x/a.js','node_modules/y/b.js','build/bundle.js','build/vendor.js']
print(t.execute({'files': files}).data['primary_language'])
# observed: 'JavaScript'  (expected: 'Python')

Related failing tests: test_node_modules_excluded, test_build_directory_excluded in tests/unit/test_tech_detector.py.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentAgent systembugSomething isn't workinggood first issueGood for first-time contributors (same as tier-1)tier-1Starter: good for first-time contributors

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions