TypeScript: stop hard-ignoring source directories named coverage#1524
Open
BinarySo1o wants to merge 2 commits into
Open
TypeScript: stop hard-ignoring source directories named coverage#1524BinarySo1o wants to merge 2 commits into
coverage#1524BinarySo1o wants to merge 2 commits into
Conversation
Both TypeScript language servers hard-ignored any directory named `coverage` in `is_ignored_dirname`, intending to skip coverage-report output but matching by bare dirname — which also hid legitimate source directories named `coverage` (e.g. `src/routes/coverage/`) from symbol tools. Generated report dirs are already covered by gitignore, so the hardcoded entry is removed. Adds a regression test asserting `coverage`/`src`/`lib`/`routes` are not ignored while `node_modules`/`dist`/`build`/`.git` still are. Fixes oraios#1523.
…name-ignore # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The TypeScript language servers (
typescript_language_server.pyandvts_language_server.py) hard-ignore any directory namedcoverageinis_ignored_dirname:The intent is to skip Jest/nyc coverage-report output, but the match is on bare dirname, so it also excludes legitimate source directories named
coverage(e.g. a REST resource atsrc/routes/coverage/). Symbol tools then fail withCannot extract symbolsfor every file under such a dir, even though it is not gitignored andis_ignored_pathreports it as not ignored — and there is no config hook to overrideis_ignored_dirname.Fixes #1523.
Fix
Remove
"coverage"from the hardcoded list in both TS servers. A real coverage-report directory is generated output and is essentially always gitignored, so gitignore already excludes it — mirroring the reasoning in #1203 (only hardcode what's universal; rely on gitignore for generated dirs).node_modules/dist/buildare intentionally left in place to keep this a single, well-scoped change.Test
Adds
test/solidlsp/typescript/test_typescript_ignored_dirs.py(mirroringtest_toml_ignored_dirs.py): assertscoverage,src,lib,routesare not ignored whilenode_modules/dist/build/.gitstill are.