* Path-only heuristic for files that should not be candidates for * "dominant file" detection: test/spec files and tool-generated files. * Generated files (`*.pb.go`, `*.pulsar.go`, mock outputs, …) often * have huge in-file edge counts that dwarf the real source — etcd's * `rpc.pb.go` has 4× th
(filePath: string)
| 30 | * `rpc.pb.go` has 4× the in-file edges of `server.go`. |
| 31 | */ |
| 32 | function isLowValueFile(filePath: string): boolean { |
| 33 | const lp = filePath.toLowerCase(); |
| 34 | return ( |
| 35 | /(?:^|\/)(tests?|__tests?__|spec)\//.test(lp) || |
| 36 | /_test\.go$/.test(lp) || |
| 37 | /(?:^|\/)test_[^/]+\.py$/.test(lp) || |
| 38 | /_test\.py$/.test(lp) || |
| 39 | /_spec\.rb$/.test(lp) || |
| 40 | /_test\.rb$/.test(lp) || |
| 41 | /\.(test|spec)\.[jt]sx?$/.test(lp) || |
| 42 | /(test|spec|tests)\.(java|kt|scala)$/.test(lp) || |
| 43 | /(tests?|spec)\.cs$/.test(lp) || |
| 44 | /tests?\.swift$/.test(lp) || |
| 45 | /_test\.dart$/.test(lp) || |
| 46 | isGeneratedFile(filePath) |
| 47 | ); |
| 48 | } |
| 49 | |
| 50 | const SQLITE_PARAM_CHUNK_SIZE = 500; |
| 51 |
no test coverage detected