Skip to content

Add SymbolInformation for local symbols per SCIP spec#167

Merged
jupblb merged 4 commits intomainfrom
michal/lint-fix
Sep 26, 2025
Merged

Add SymbolInformation for local symbols per SCIP spec#167
jupblb merged 4 commits intomainfrom
michal/lint-fix

Conversation

@jupblb
Copy link
Copy Markdown
Collaborator

@jupblb jupblb commented Sep 26, 2025

Fixes scip lint issue of missing local symbol definitions (there is still an issue of missing external symbols).

According to the SCIP specification, Document.symbols should contain all symbols defined within the document, including local symbols (local variables, parameters, etc.). Local symbols use the format 'local ' and must be included in Document.symbols for proper SCIP compliance.

This change adds SymbolInformation entries for all local symbols to each document, fixing scip lint errors about missing symbol definitions for local 0, local 1, etc.

Also added AGENTS.md.

According to the SCIP specification, Document.symbols should contain all
symbols defined within the document, including local symbols (local variables,
parameters, etc.). Local symbols use the format 'local <id>' and must be
included in Document.symbols for proper SCIP compliance.

This change adds SymbolInformation entries for all local symbols to each
document, fixing scip lint errors about missing symbol definitions for
local 0, local 1, etc.

Per scip.proto:
- Document.symbols: 'Symbols that are defined within this document' (line 91)
- Local symbols 'MUST only be used for entities which are local to a
  Document' (line 187-188)

Amp-Thread-ID: https://ampcode.com/threads/T-9333bd1b-1af9-443f-9d31-4cce0fc688f0
@jupblb jupblb self-assigned this Sep 26, 2025
Copy link
Copy Markdown
Contributor

@varungandhi-src varungandhi-src left a comment

Choose a reason for hiding this comment

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

I think it's good to fix this error, but testing-wise, I think it'd be better to take a different approach.

Comment thread internal/visitors/visitor_file_test.go Outdated
@jupblb jupblb merged commit 7456957 into main Sep 26, 2025
4 checks passed
@jupblb jupblb deleted the michal/lint-fix branch September 26, 2025 12:47
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