Skip to content
This repository was archived by the owner on Nov 14, 2025. It is now read-only.

Commit 7780f2d

Browse files
committed
fix: properly configure deepsource test patterns and exclusions
- Add test_patterns to identify test files for different rule application - Separate test_patterns from exclude_patterns for proper handling - Add TypeScript dialect configuration for JavaScript analyzer - Enable both analyzers explicitly - Add skip_doc_coverage for test files - Remove invalid analyzer.meta.rules configuration - This should reduce false positives from DeepSource analysis
1 parent f57e7bf commit 7780f2d

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

.deepsource.toml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,40 @@
11
version = 1
22

3-
# Exclude test files from analysis
4-
exclude_patterns = [
3+
# Define test file patterns - DeepSource will apply different rules to these files
4+
test_patterns = [
55
"**/__tests__/**",
66
"**/*.test.ts",
77
"**/*.spec.ts",
88
"**/test-*.ts",
9-
"src/__tests__/**",
9+
"src/__tests__/**"
10+
]
11+
12+
# Exclude files from analysis entirely
13+
exclude_patterns = [
1014
"coverage/**",
1115
"dist/**",
12-
"node_modules/**"
16+
"build/**",
17+
"out/**",
18+
"node_modules/**",
19+
".nyc_output/**",
20+
"*.config.js",
21+
"*.config.ts",
22+
"jest.setup.ts",
23+
"vitest.setup.ts",
24+
"docs/**",
25+
"examples/**"
1326
]
1427

1528
[[analyzers]]
1629
name = "test-coverage"
30+
enabled = true
1731

1832
[[analyzers]]
1933
name = "javascript"
34+
enabled = true
2035

2136
[analyzers.meta]
2237
plugins = ["react"]
23-
24-
# Configure specific rules
25-
[[analyzers.meta.rules]]
26-
# Allow 'any' type in test files
27-
paths = ["**/__tests__/**", "**/*.test.ts", "**/*.spec.ts"]
28-
config = { "no-explicit-any" = "off" }
38+
dialect = "typescript"
39+
# Skip issues in test files
40+
skip_doc_coverage = ["test_*", "**/__tests__/**", "**/*.test.ts", "**/*.spec.ts"]

0 commit comments

Comments
 (0)