TypeScript: stop hard-ignoring source directories named coverage - #1524
Merged
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
MischaPanch
force-pushed
the
main
branch
6 times, most recently
from
June 28, 2026 20:38
ee32c5e to
ebe7646
Compare
6 tasks
There was a problem hiding this comment.
Pull request overview
This PR fixes an over-broad hardcoded ignore rule in the TypeScript language servers that excluded any directory named coverage, which unintentionally hid legitimate source directories (e.g. src/routes/coverage/) from symbol extraction. It removes coverage from the TypeScript and vtsls (typescript_vts) directory ignore lists, relying on gitignore to exclude real generated coverage-report output, and adds a regression test plus a changelog entry.
Changes:
- Stop hard-ignoring directories named
coveragein bothtypescriptandtypescript_vtslanguage servers. - Add a regression test asserting
coverageis not ignored while still ignoring standard generated/VCS dirs. - Document the fix in
CHANGELOG.md.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/solidlsp/language_servers/typescript_language_server.py |
Removes coverage from the hardcoded ignored-dirname list for the default TypeScript LS. |
src/solidlsp/language_servers/vts_language_server.py |
Removes coverage from the hardcoded ignored-dirname list for the vtsls-based TypeScript LS. |
test/solidlsp/typescript/test_typescript_ignored_dirs.py |
Adds a regression test for coverage being treated as a valid source directory name. |
CHANGELOG.md |
Adds a release note describing the behavioral change and linking it to #1523. |
| pytestmark = pytest.mark.typescript | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("language_server", [Language.TYPESCRIPT], indirect=True) |
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.