mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-06 02:49:56 +00:00
Replace the 120-line if-chain in resolveLanguageImport() and the 7-branch dispatch in extractNamedBindings() with per-language dispatch tables using `satisfies Record<SupportedLanguages, T>` for compile-time exhaustiveness. Key changes: - New import-resolution.ts: buildImportResolvers factory + namedBindingExtractors table + preprocessImportPath with control character rejection - Extracted loadImportConfigs(), createImportEdgeHelpers(), getLabelFromCaptures() to eliminate duplication across import-processor.ts and parse-worker.ts - Added isCppDuplicateClassFunction and getLabelFromCaptures shared helpers - Migrated ENTRY_POINT_PATTERNS and AST_FRAMEWORK_PATTERNS_BY_LANGUAGE to satisfies Record<SupportedLanguages, T> with compile-time exhaustiveness - Added Kotlin entry-point patterns (Android lifecycle, Ktor, MVVM) - Expanded framework detection: Go (Gin/Echo/Fiber/gRPC), Rust (Actix/Axum/ Rocket/Tokio), C++ (Qt), Swift (UIKit/SwiftUI/Vapor), Ruby (Rails/Sinatra) - Fixed Go cmd/ entry-point detection operator precedence bug - Added EMPTY_INDEX frozen sentinel for type-safe memory cleanup - Unified ImportResolutionContext (suffixIndex->index, removed unused dispose()) - Extracted NamedBinding interface (replaced 16 inline occurrences) - Replaced any with SyntaxNode on all tree-sitter node parameters - Added contributor checklist to SupportedLanguages enum 14 files changed, +318/-550 (net -232 lines). All 3550+ tests pass. |
||
|---|---|---|
| .. | ||
| resolvers | ||
| augmentation.test.ts | ||
| cli-e2e.test.ts | ||
| cross-file-binding.test.ts | ||
| csv-pipeline.test.ts | ||
| enrichment.test.ts | ||
| filesystem-walker.test.ts | ||
| has-method.test.ts | ||
| hooks-e2e.test.ts | ||
| ignore-and-skip-e2e.test.ts | ||
| lbug-core-adapter.test.ts | ||
| lbug-pool-stability.test.ts | ||
| lbug-pool.test.ts | ||
| local-backend-calltool.test.ts | ||
| local-backend.test.ts | ||
| parsing.test.ts | ||
| pipeline.test.ts | ||
| query-compilation.test.ts | ||
| search-core.test.ts | ||
| search-pool.test.ts | ||
| setup-skills.test.ts | ||
| skills-e2e.test.ts | ||
| staleness-and-stability.test.ts | ||
| tree-sitter-languages.test.ts | ||
| worker-pool.test.ts | ||