mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-29 01:41:42 +00:00
* refactor(ingestion): consolidate per-language patterns into LanguageProvider Move entry-point name patterns and AST framework detection patterns from shared maps in entry-point-scoring.ts and framework-detection.ts into each LanguageProvider. The shared files now build their lookup tables dynamically from the provider registry at module load. This aligns with the architecture principle that shared pipeline code must not name languages. Adding a new language no longer requires modifying entry-point-scoring.ts or framework-detection.ts — the provider file is the single source of truth for all language-specific data. New LanguageProvider fields: - entryPointPatterns: RegExp[] (default: []) - astFrameworkPatterns: AstFrameworkPatternConfig[] (default: []) * test(ingestion): add provider-registry, multiplier/reason, and Kotlin/Dart/Ruby entry-point coverage Addresses review feedback on the per-language pattern consolidation: - Runtime guard that providers map covers every SupportedLanguages member, catching enum/registry drift that the compile-time `satisfies` cannot. - Multiplier/reason parity assertions for nestjs (3.2/nestjs-decorator), spring (3.2/spring-annotation), and fastapi (3.0/fastapi-decorator) so a silent value change during future relocations would fail loudly. - Entry-point pattern coverage for Kotlin (Android lifecycle, ViewModel, Service), Dart (Flutter widget lifecycle), and Ruby (call/perform/execute) — the three providers whose patterns moved without representative tests. * refactor(ingestion): apply satisfies AstFrameworkPatternConfig[] to remaining providers The c-cpp, dart, php, ruby, and swift providers imported AstFrameworkPatternConfig but never used it, which the root ESLint config flagged as a hard error in the quality / lint CI gate. Use the type the same way csharp/go/java/kotlin/python/rust/typescript already do — as a satisfies assertion on the astFrameworkPatterns array. This both clears the unused-import error and gives every provider compile-time validation of pattern shape, narrowing the gap that the original review flagged about lost exhaustiveness on the optional astFrameworkPatterns field. --------- Co-authored-by: Gergo Magyar <gergomagyar@icloud.com> |
||
|---|---|---|
| .. | ||
| cli | ||
| config | ||
| core | ||
| lib | ||
| mcp | ||
| server | ||
| storage | ||
| types | ||