Skip to content

Reject C# continuation lines as declarations - #4925

Merged
Widthdom merged 6 commits into
mainfrom
fix-issue4831
Jul 27, 2026
Merged

Reject C# continuation lines as declarations#4925
Widthdom merged 6 commits into
mainfrom
fix-issue4831

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • add a column-aware declaration-start scope for C# function candidates
  • reject invocation and parameter continuation lines while preserving valid multiline methods, constructors, delegates, and local functions
  • reconcile preprocessor branch state and ignore directive payload delimiters
  • bump the C# symbol extractor contract to 7

Root cause

The broad multiline declaration merger could begin inside an unmatched expression or parameter parenthesis and consume a later brace, turning continuation tokens into function declarations.

Validation

  • dotnet build CodeIndex.sln -c Release --no-restore -p:UseSharedCompilation=false
  • dotnet build CodeIndex.sln -c Debug --no-restore -p:UseSharedCompilation=false
  • full Release suite after the final semantic fix:
    • net9.0: 10,039 passed, 419 skipped, 0 failed
    • net8.0: 10,512 passed, 7 skipped, 0 failed
  • focused C# and Issue Reject C# continuation lines as function declarations #4831 tests after merging the latest origin/main:
    • net9.0: 292 passed, 5 skipped, 0 failed
    • net8.0: 297 passed, 0 skipped, 0 failed
  • rebuilt the repository index and verified exact function queries:
    • GetIndexedLanguageCount: one real declaration
    • out: zero declarations
    • params: zero declarations
  • dotnet format CodeIndex.sln --no-restore --verify-no-changes
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • cdidx status --check --json: index matches the workspace

Documentation and changelog

  • updated TESTING_GUIDE.md in English and Japanese
  • added changelog.d/unreleased/4831.fixed.md

Review

Two Codex adversarial review rounds were completed. All reported actionable findings were addressed; the configured two-round review limit was reached.

Follow-ups

None.

Fixes #4831

@Widthdom
Widthdom marked this pull request as ready for review July 27, 2026 08:10
@Widthdom
Widthdom merged commit 920630e into main Jul 27, 2026
11 checks passed
@Widthdom
Widthdom deleted the fix-issue4831 branch July 27, 2026 08:10
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.

Reject C# continuation lines as function declarations

1 participant