From 11829f97ef4a7364560870546c7ec7b0d7288fe5 Mon Sep 17 00:00:00 2001 From: Gergo Magyar Date: Sun, 3 May 2026 10:14:41 +0100 Subject: [PATCH] refactor(ingestion): apply satisfies AstFrameworkPatternConfig[] to remaining providers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- gitnexus/src/core/ingestion/languages/c-cpp.ts | 2 +- gitnexus/src/core/ingestion/languages/dart.ts | 2 +- gitnexus/src/core/ingestion/languages/php.ts | 2 +- gitnexus/src/core/ingestion/languages/ruby.ts | 2 +- gitnexus/src/core/ingestion/languages/swift.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gitnexus/src/core/ingestion/languages/c-cpp.ts b/gitnexus/src/core/ingestion/languages/c-cpp.ts index 907b1da6d..a5b3e5729 100644 --- a/gitnexus/src/core/ingestion/languages/c-cpp.ts +++ b/gitnexus/src/core/ingestion/languages/c-cpp.ts @@ -408,7 +408,7 @@ export const cppProvider = defineLanguage({ 'QApplication', ], }, - ], + ] satisfies AstFrameworkPatternConfig[], treeSitterQueries: CPP_QUERIES, typeConfig: cCppConfig, exportChecker: cCppExportChecker, diff --git a/gitnexus/src/core/ingestion/languages/dart.ts b/gitnexus/src/core/ingestion/languages/dart.ts index 29a63fd3a..01d9bd31f 100644 --- a/gitnexus/src/core/ingestion/languages/dart.ts +++ b/gitnexus/src/core/ingestion/languages/dart.ts @@ -129,7 +129,7 @@ export const dartProvider = defineLanguage({ reason: 'riverpod-pattern', patterns: ['@riverpod', 'ref.watch', 'ref.read', 'AsyncNotifier', 'Notifier'], }, - ], + ] satisfies AstFrameworkPatternConfig[], treeSitterQueries: DART_QUERIES, typeConfig: dartConfig, exportChecker: dartExportChecker, diff --git a/gitnexus/src/core/ingestion/languages/php.ts b/gitnexus/src/core/ingestion/languages/php.ts index 3689f297f..eb8f296f8 100644 --- a/gitnexus/src/core/ingestion/languages/php.ts +++ b/gitnexus/src/core/ingestion/languages/php.ts @@ -274,7 +274,7 @@ export const phpProvider = defineLanguage({ '#[Route(', ], }, - ], + ] satisfies AstFrameworkPatternConfig[], treeSitterQueries: PHP_QUERIES, typeConfig: phpConfig, exportChecker: phpExportChecker, diff --git a/gitnexus/src/core/ingestion/languages/ruby.ts b/gitnexus/src/core/ingestion/languages/ruby.ts index 6ea6f5b8b..e5f71ee56 100644 --- a/gitnexus/src/core/ingestion/languages/ruby.ts +++ b/gitnexus/src/core/ingestion/languages/ruby.ts @@ -176,7 +176,7 @@ export const rubyProvider = defineLanguage({ reason: 'sinatra-pattern', patterns: ['Sinatra::Base', 'Sinatra::Application'], }, - ], + ] satisfies AstFrameworkPatternConfig[], treeSitterQueries: RUBY_QUERIES, typeConfig: rubyConfig, exportChecker: rubyExportChecker, diff --git a/gitnexus/src/core/ingestion/languages/swift.ts b/gitnexus/src/core/ingestion/languages/swift.ts index 654e7b638..128809cba 100644 --- a/gitnexus/src/core/ingestion/languages/swift.ts +++ b/gitnexus/src/core/ingestion/languages/swift.ts @@ -313,7 +313,7 @@ export const swiftProvider = defineLanguage({ reason: 'vapor-routing', patterns: ['app.get', 'app.post', 'req.content.decode', 'Vapor'], }, - ], + ] satisfies AstFrameworkPatternConfig[], treeSitterQueries: SWIFT_QUERIES, typeConfig: swiftConfig, exportChecker: swiftExportChecker,