Commit 716a219
authored
fix(cli): match lint test-file exclusion relative to scan root (#490)
* fix(cli): match lint test-file exclusion relative to scan root
isTestFile substring-matched "/tests/" against the absolute path, so any
ancestor directory named tests (e.g. ~/Developer/tests/my-app) classified
every file in the project as a test file and silently disabled all
includeTests:false rules (no-variants-in-prod, no-as-any).
Match against the path relative to the scan root with path-segment
boundaries instead, so only the project's own test files and tests/ dirs
are excluded.
Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
---------
Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
Co-authored-by: MarioCadenas <MarioCadenas@users.noreply.github.com>1 parent affe5d2 commit 716a219
1 file changed
Lines changed: 11 additions & 5 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | | - | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
76 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
77 | 83 | | |
78 | 84 | | |
79 | 85 | | |
80 | | - | |
| 86 | + | |
81 | 87 | | |
82 | 88 | | |
83 | 89 | | |
| |||
120 | 126 | | |
121 | 127 | | |
122 | 128 | | |
123 | | - | |
| 129 | + | |
124 | 130 | | |
125 | 131 | | |
126 | 132 | | |
| |||
0 commit comments