Skip to content

fix(scanner): same-dir C/C++/PHP includes resolve, Elixir symbol-level, 20-language conformance test - #202

Open
JordanCoin wants to merge 1 commit into
mainfrom
fix/language-conformance
Open

JordanCoin wants to merge 1 commit into
mainfrom
fix/language-conformance

Conversation

@JordanCoin

Copy link
Copy Markdown
Owner

What a probe of all 20 detected languages found

Built the smallest two-file repo per language (a imports b the idiomatic way) and ran BuildFileGraph. Before this PR:

language a→b edge coverage verdict
c, cpp none complete wrong answer: #include "b.h" normalized to b/h
php none complete wrong answer: require_once 'b.php' normalized to b/php
elixir none complete mislabelled: alias App.B names a module, not a file
java, kotlin, scala, csharp none partial honest, declared
swift yes partial honest, type-name edges
rust yes partial honest, macro note
go, python, js, ts, ruby, dart, bash, lua, solidity, cue yes complete correct

Subdirectory includes (#include "inc/b.h") already worked because the slash short-circuits the dot rule, which is why real C repos got some edges and nobody filed it.

Changes

  • normalizeImport: the Python dots-to-slashes rule skips imports whose last dot introduces a known source extension. Regression cases for b.h and b.php.
  • symbolLevelImportLanguages gains Elixir; an Elixir-only graph now reports partial with the module-import note instead of complete.
  • scanner/conformance_test.go: one inline fixture per language in extToLang, asserting edge and coverage status. TestConformanceCoversEveryDetectedLanguage fails if an extension is added without a case.

go build ./... && go test ./... && gofmt -l . clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NRaBgKRAZMX9hjbkkefA7T

…red symbol-level; one conformance case per language

normalizeImport turned every dotted, slash-free import into a path, so
`#include "b.h"` and `require_once 'b.php'` became b/h and b/php and
resolved to nothing. Only dots that do not introduce a known source
extension are module separators now.

Elixir aliases name modules, not files, so an empty Elixir graph was
labelled complete. It joins the symbol-level set and reports partial
with the same note as Java, Kotlin, Scala and C#.

conformance_test.go builds the smallest two-file repository for each of
the 20 detected languages and asserts the a->b edge and coverage status.
A language added to extToLang without a case fails the suite.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NRaBgKRAZMX9hjbkkefA7T
Copilot AI balanced review requested due to automatic review settings October 11, 2026 11:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants