Commit 444b7cd
authored
feat(scanner): Multi-language repository scanner with 94.47% test coverage (#13)
* feat(scanner): implement multi-language scanner with TypeScript and Markdown support
- Add scanner type definitions and interfaces
- Implement TypeScriptScanner using ts-morph for deep AST analysis
- Implement MarkdownScanner using remark for documentation
- Create ScannerRegistry for managing multiple language scanners
- Add comprehensive tests (all passing)
- Fix pre-commit hook to use correct Biome syntax
Features:
- TypeScript: extracts functions, classes, methods, interfaces with type info
- Markdown: extracts documentation sections with headings
- Pluggable architecture: easy to add more language scanners
- Tested on dev-agent codebase itself
Issue: #3
* test(scanner): improve test coverage to 94.47% and add comprehensive exclusions
Coverage improvements:
- Overall scanner package: 88.02% → 94.47% (+6.45%)
- Registry: 68.42% → 100% (+31.58% - perfect coverage!)
- Tests: 8 → 24 tests (tripled)
New test coverage:
- Scanner error handling and recovery
- Language-specific scanner retrieval
- Auto glob pattern building
- Default exclusions verification
- Mixed language repositories
- Method extraction from classes
- Case-insensitive file extensions
Best practice exclusions (industry standards):
- Dependencies: node_modules, vendor, bower_components, third_party
- Build artifacts: dist, build, out, target, .next, .turbo
- Version control: .git, .svn, .hg
- IDE/Editor: .vscode, .idea, .vs, .fleet
- Caches: .cache, .parcel-cache, .eslintcache
- Test coverage: coverage, .nyc_output
- Lock files: package-lock.json, yarn.lock, pnpm-lock.yaml
- Analysis/reports: analysis-reports, .research, benchmarks
- Test fixtures: __fixtures__, __snapshots__
Improvements:
- Case-insensitive file extension handling
- Comprehensive default exclusion patterns
- Better error handling documentation1 parent 3486736 commit 444b7cd
File tree
36 files changed
+2183
-301
lines changed- .husky
- packages/core
- src
- api
- context
- github
- scanner
- vector
36 files changed
+2183
-301
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
16 | 23 | | |
17 | 24 | | |
18 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | | - | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
11 | | - | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
26 | 36 | | |
27 | 37 | | |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments