fix(extraction): count all file-level-tracked langs (incl .properties) as indexed (#544)
Completes #357. The no-symbol file-level class is yaml/twig/properties, but the count fix only covered yaml/twig — so a .properties-only project still printed "No files found to index" even though the files were stored. Introduce a single isFileLevelOnlyLanguage predicate (the canonical set behind the tree-sitter no-symbol branch, xml excluded since its MyBatis extractor emits a file node) and use it at both count sites and the extraction dispatch so the list can't drift. Adds .properties regression coverage for indexAll() and indexFiles(). Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
839cf63dcb
commit
cdbf451440
@@ -290,6 +290,19 @@ export function isGrammarLoaded(language: Language): boolean {
|
||||
return languageCache.has(language);
|
||||
}
|
||||
|
||||
/**
|
||||
* Languages tracked at the file-record level only: parsing emits zero symbol
|
||||
* nodes, but the file is still stored (and framework resolvers may add per-file
|
||||
* references later, e.g. Drupal routing yml, Spring `@Value` against
|
||||
* application.properties). This is the canonical set behind the no-symbol
|
||||
* branch in `tree-sitter.ts`; `xml` is intentionally excluded because its
|
||||
* MyBatis extractor emits a file node. Callers use this to count such files as
|
||||
* indexed rather than skipped, so it must stay in sync with that branch.
|
||||
*/
|
||||
export function isFileLevelOnlyLanguage(language: Language): boolean {
|
||||
return language === 'yaml' || language === 'twig' || language === 'properties';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all supported languages (those with grammar definitions).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user