Skip to content

Conversation

@prosdev
Copy link
Collaborator

@prosdev prosdev commented Dec 10, 2025

Summary

Implements Epic #128, Issue #129: Go scanner using tree-sitter WASM for parsing.

Changes

New Files

  • packages/core/src/scanner/tree-sitter.ts - Tree-sitter WASM utility module (reusable for future languages)
  • packages/core/src/scanner/go.ts - GoScanner implementation with query-based extraction
  • packages/core/src/scanner/__tests__/go.test.ts - 30 tests
  • packages/core/src/scanner/__tests__/fixtures/go/ - Go test fixtures

Modified Files

  • packages/core/package.json - Added web-tree-sitter and tree-sitter-wasms dependencies
  • packages/core/src/scanner/index.ts - Export GoScanner, register in default registry
  • packages/subagents/src/explorer/__tests__/index.test.ts - Mock logger in error test (unrelated fix)

Features

  • Tree-sitter WASM - No Go installation required to index Go code
  • Query-based extraction - Uses tree-sitter queries (like Aider) for maintainability
  • Extracts: functions, methods, structs, interfaces, types, exported constants
  • Skips generated files - Files starting with // Code generated
  • Test file detection - Marks *_test.go files with isTest: true

Test Results

  • 30 new Go scanner tests passing
  • 1543 total tests passing (no regressions)

Related

Suppress expected error log output during test that deliberately
triggers an error condition by closing the indexer.
Implements issue #129: Go scanner using tree-sitter WASM for parsing.

- Add web-tree-sitter and tree-sitter-wasms dependencies
- Add tree-sitter utility module (reusable for future languages)
- Implement GoScanner with query-based extraction
- Extract: functions, methods, structs, interfaces, types, constants
- Skip generated files (// Code generated)
- 30 tests with Go fixtures

Closes #129
@prosdev prosdev merged commit 762caea into main Dec 10, 2025
1 check passed
@prosdev prosdev deleted the feat/go-scanner branch December 10, 2025 20:17
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.

feat(core): Go scanner with tree-sitter infrastructure

1 participant