Commit Graph
4 Commits
Author SHA1 Message Date
Yatharth Verma 96c39d6a88 test: skip optional-extra tests when the extra is not installed (#4190)
Grammar and SDK tests for erlang, r, solidity, vbnet, ollama and the sql encoding case failed instead of skipping on a default uv sync. Guard them with the existing _needs_* skipif pattern and point CONTRIBUTING at uv sync --all-extras to match CI.

Co-Authored-By: Claude <noreply@anthropic.com>
(cherry picked from commit d7f443eeb1)
2026-10-07 17:26:00 +01:00
rajatnagda45 4f0eb679bf fix(solidity): link enum values with case_of instead of contains
A Solidity enum value is a discriminant case, not a declared member, so it
should hang off its enum with a case_of edge like every other language that
has enums (Java #1719, C#, Swift, Rust, VB.NET). Solidity was the lone
remaining outlier, routing enum values through the same contains path used
for struct fields.

The relation is not cosmetic: case_of targets are excluded from constructor
binding, so an enum value named like a type could previously be mistaken for
one. Struct fields keep contains, since a field is a real declaration.

Add a regression test asserting enum values get case_of (and not contains)
while a struct field keeps contains.

(cherry picked from commit fdd99502d7)
2026-10-05 19:40:03 +01:00
rajatnagda45 85390c83a4 fix(solidity): extract file-level free functions and their calls
Free (file-level) functions have been valid Solidity since 0.7, but the
extractor only descended into named type declarations (contract, library,
interface, abstract contract). A function declared at source-unit scope —
and every call made from its body — was dropped entirely, so a file of
free utility functions produced no nodes at all.

Walk source-unit function_definition nodes, emit each as a file-contained
callable node, and resolve an unambiguous same-file free-function call to a
calls edge. Member calls (Lib.f()) are parked as raw_calls for cross-file
resolution; calls that cross into contract scope are left unresolved rather
than guessed (fail-closed).

(cherry picked from commit d2e56e932f)
2026-09-30 20:41:10 +01:00
Abdullah 9f069eafea feat: add Solidity language extractor
(cherry picked from commit 41a1575e5e)
2026-09-21 19:13:40 +01:00