codeguard-testgen 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +332 -40
- package/dist/config.d.ts +2 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +980 -865
- package/dist/index.js.map +1 -1
- package/dist/typeValidator.d.ts +25 -0
- package/dist/typeValidator.d.ts.map +1 -0
- package/dist/typeValidator.js +180 -0
- package/dist/typeValidator.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,23 +1,37 @@
|
|
|
1
|
-
# CodeGuard Test Generator
|
|
1
|
+
# CodeGuard - AI Code Review & Test Generator
|
|
2
2
|
|
|
3
|
-
AI-powered unit test generator with AST analysis for TypeScript/JavaScript projects. Automatically generates comprehensive Jest tests using Claude, OpenAI, or Gemini.
|
|
3
|
+
AI-powered code review and unit test generator with AST analysis for TypeScript/JavaScript projects. Automatically reviews code quality and generates comprehensive Jest tests using Claude, OpenAI, or Gemini.
|
|
4
4
|
|
|
5
|
-
> **⚡ NEW: Auto Mode** - Automatically
|
|
5
|
+
> **⚡ NEW: Unified Auto Mode** - Automatically review code quality AND generate tests for changed functions!
|
|
6
6
|
> ```bash
|
|
7
|
-
> testgen auto
|
|
7
|
+
> testgen auto # Reviews code + generates tests
|
|
8
|
+
> testgen review # Only code review
|
|
9
|
+
> testgen test # Only test generation
|
|
8
10
|
> ```
|
|
9
11
|
|
|
10
12
|
## Features
|
|
11
13
|
|
|
14
|
+
### Code Review
|
|
15
|
+
- 🔍 **AI Code Review**: Comprehensive analysis of code quality, bugs, performance, and security
|
|
16
|
+
- 👨💻 **Senior Developer Perspective**: AI reviews code like an experienced developer
|
|
17
|
+
- 📊 **Structured Reports**: Markdown reviews with severity levels (Critical, High, Medium, Low)
|
|
18
|
+
- 🎯 **Context-Aware**: Uses AST analysis to understand full code context before reviewing
|
|
19
|
+
- 📁 **Review History**: All reviews saved to `reviews/` directory for reference
|
|
20
|
+
|
|
21
|
+
### Test Generation
|
|
12
22
|
- 🤖 **AI-Powered**: Uses Claude, OpenAI GPT, or Google Gemini to generate intelligent tests
|
|
13
23
|
- 🔍 **AST Analysis**: Deep code analysis using Babel parser for accurate test generation
|
|
14
24
|
- 📦 **Codebase Indexing**: Optional caching for 100x faster analysis on large projects
|
|
15
25
|
- 🎯 **Multiple Modes**: File-wise, folder-wise, function-wise, or auto test generation
|
|
16
|
-
- ⚡ **Auto Mode**: Detects git changes and automatically generates tests for modified functions
|
|
17
26
|
- ✅ **Smart Validation**: Detects incomplete tests, missing assertions, and legitimate failures
|
|
18
27
|
- 🔄 **Iterative Fixing**: Automatically fixes import errors, missing mocks, and test issues
|
|
19
28
|
- 📋 **TypeScript Support**: Full support for TypeScript types, interfaces, and decorators
|
|
20
29
|
|
|
30
|
+
### Unified Workflow
|
|
31
|
+
- ⚡ **Auto Mode**: Reviews code quality + generates tests for changed functions
|
|
32
|
+
- 🔄 **Git Integration**: Detects changes via git diff (staged and unstaged)
|
|
33
|
+
- 🚀 **CI/CD Ready**: Non-interactive modes perfect for automation
|
|
34
|
+
|
|
21
35
|
## Installation
|
|
22
36
|
|
|
23
37
|
### Global Installation (Recommended)
|
|
@@ -51,7 +65,8 @@ Create a `codeguard.json` file in your project root:
|
|
|
51
65
|
},
|
|
52
66
|
"testDir": "src/tests",
|
|
53
67
|
"extensions": [".ts", ".tsx", ".js", ".jsx"],
|
|
54
|
-
"excludeDirs": ["node_modules", "dist", "build", ".git", "coverage"]
|
|
68
|
+
"excludeDirs": ["node_modules", "dist", "build", ".git", "coverage"],
|
|
69
|
+
"validationInterval": 5
|
|
55
70
|
}
|
|
56
71
|
```
|
|
57
72
|
|
|
@@ -65,6 +80,36 @@ Create a `codeguard.json` file in your project root:
|
|
|
65
80
|
| `testDir` | No | Directory for test files (default: `src/tests`) |
|
|
66
81
|
| `extensions` | No | File extensions to process (default: `.ts`, `.tsx`, `.js`, `.jsx`) |
|
|
67
82
|
| `excludeDirs` | No | Directories to exclude from scanning |
|
|
83
|
+
| `validationInterval` | No | Validation frequency in function-wise mode: `undefined` = no validation, `0` = only at end, `N` = validate every N functions |
|
|
84
|
+
|
|
85
|
+
### Validation Interval
|
|
86
|
+
|
|
87
|
+
The `validationInterval` option controls when the full test suite is validated during function-wise test generation:
|
|
88
|
+
|
|
89
|
+
- **`undefined` (default)**: No periodic validation - fastest, tests each function independently
|
|
90
|
+
- **`0`**: Validate only at the end after all functions are processed
|
|
91
|
+
- **`N` (number)**: Validate every N functions to catch integration issues early
|
|
92
|
+
|
|
93
|
+
**Example use cases:**
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"validationInterval": undefined // Fast - no validation checkpoints
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
```json
|
|
101
|
+
{
|
|
102
|
+
"validationInterval": 5 // Validate after every 5 functions
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"validationInterval": 0 // Validate only once at the end
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Recommendation**: Use `5` or `10` for large files with many functions to catch integration issues early. Use `undefined` for fastest processing.
|
|
68
113
|
|
|
69
114
|
### Getting API Keys
|
|
70
115
|
|
|
@@ -77,7 +122,9 @@ Create a `codeguard.json` file in your project root:
|
|
|
77
122
|
|
|
78
123
|
| Command | Description | Use Case |
|
|
79
124
|
|---------|-------------|----------|
|
|
80
|
-
| `testgen auto` |
|
|
125
|
+
| `testgen auto` | Review code quality + generate tests | Complete workflow, CI/CD |
|
|
126
|
+
| `testgen review` | Only review code changes | Code review, quality checks |
|
|
127
|
+
| `testgen test` | Only generate tests for changes | Testing workflow |
|
|
81
128
|
| `testgen` | Interactive mode - choose mode manually | Exploratory testing |
|
|
82
129
|
| Mode 1: File-wise | Generate tests for entire file | New files, comprehensive coverage |
|
|
83
130
|
| Mode 2: Folder-wise | Generate tests for all files in folder | Batch processing |
|
|
@@ -85,18 +132,94 @@ Create a `codeguard.json` file in your project root:
|
|
|
85
132
|
|
|
86
133
|
## Usage
|
|
87
134
|
|
|
88
|
-
### Auto Mode (Recommended
|
|
135
|
+
### Auto Mode - Complete Workflow (Recommended)
|
|
89
136
|
|
|
90
|
-
Automatically
|
|
137
|
+
Automatically review code quality and generate tests for changed functions:
|
|
91
138
|
|
|
92
139
|
```bash
|
|
93
140
|
testgen auto
|
|
94
141
|
```
|
|
95
142
|
|
|
96
|
-
|
|
143
|
+
**What it does:**
|
|
144
|
+
1. **Reviews changed code** for quality, bugs, performance, and security issues
|
|
145
|
+
2. **Generates comprehensive tests** for modified functions
|
|
146
|
+
3. Saves review to `reviews/{filename}.review.md`
|
|
147
|
+
4. Creates or updates test files
|
|
148
|
+
|
|
149
|
+
**Example output:**
|
|
150
|
+
```
|
|
151
|
+
🔍 Scanning git changes for review...
|
|
152
|
+
📝 Found changes in 1 file(s) to review
|
|
153
|
+
|
|
154
|
+
🔄 Reviewing: src/services/user.service.ts
|
|
155
|
+
📦 Changed functions: createUser, updateUser
|
|
156
|
+
✅ Review completed
|
|
157
|
+
|
|
158
|
+
📁 Reviews saved to: reviews/ directory
|
|
159
|
+
|
|
160
|
+
============================================================
|
|
161
|
+
|
|
162
|
+
🔍 Scanning git changes for testing...
|
|
163
|
+
📝 Found changes in 1 file(s)
|
|
164
|
+
|
|
165
|
+
🔄 Processing: src/services/user.service.ts
|
|
166
|
+
📦 Changed functions: createUser, updateUser
|
|
167
|
+
✅ Tests generated successfully
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Review Only Mode
|
|
171
|
+
|
|
172
|
+
Get AI code review without generating tests:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
testgen review
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**What gets reviewed:**
|
|
179
|
+
- 🎯 **Code Quality**: Naming, complexity, readability, best practices
|
|
180
|
+
- 🐛 **Potential Bugs**: Logic errors, edge cases, type mismatches, async issues
|
|
181
|
+
- ⚡ **Performance**: Inefficient algorithms, memory leaks, unnecessary computations
|
|
182
|
+
- 🔒 **Security**: Input validation, injection risks, authentication issues
|
|
183
|
+
|
|
184
|
+
**Review output** (`reviews/{filename}.review.md`):
|
|
185
|
+
```markdown
|
|
186
|
+
# Code Review: user.service.ts
|
|
187
|
+
|
|
188
|
+
## Summary
|
|
189
|
+
Overall code quality is good with some areas for improvement...
|
|
190
|
+
|
|
191
|
+
## Findings
|
|
192
|
+
|
|
193
|
+
### 🔴 Critical Issues
|
|
194
|
+
#### [Security] Missing Input Validation
|
|
195
|
+
**Function**: `createUser`
|
|
196
|
+
**Issue**: Email parameter not validated before database insertion...
|
|
197
|
+
**Recommended Fix**:
|
|
198
|
+
...typescript
|
|
199
|
+
if (!email || !email.includes('@')) {
|
|
200
|
+
throw new Error('Invalid email');
|
|
201
|
+
}
|
|
202
|
+
...
|
|
203
|
+
|
|
204
|
+
### 🟡 Medium Priority Issues
|
|
205
|
+
#### [Performance] Inefficient Loop
|
|
206
|
+
...
|
|
207
|
+
|
|
208
|
+
## ✅ Positive Aspects
|
|
209
|
+
- Well-structured error handling
|
|
210
|
+
- Clear function naming
|
|
211
|
+
|
|
212
|
+
## 💡 General Recommendations
|
|
213
|
+
1. Add input validation for all public functions
|
|
214
|
+
2. Consider adding JSDoc comments
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Test Generation Only Mode
|
|
218
|
+
|
|
219
|
+
Generate tests without code review:
|
|
97
220
|
|
|
98
221
|
```bash
|
|
99
|
-
|
|
222
|
+
testgen test
|
|
100
223
|
```
|
|
101
224
|
|
|
102
225
|
**How it works:**
|
|
@@ -106,7 +229,9 @@ codeguard auto
|
|
|
106
229
|
4. Automatically generates or updates tests for those functions
|
|
107
230
|
5. No user interaction required - perfect for automation!
|
|
108
231
|
|
|
109
|
-
**Example
|
|
232
|
+
**Example workflows:**
|
|
233
|
+
|
|
234
|
+
**Complete workflow (review + test):**
|
|
110
235
|
```bash
|
|
111
236
|
# Make changes to your code
|
|
112
237
|
vim src/services/user.service.ts
|
|
@@ -114,10 +239,25 @@ vim src/services/user.service.ts
|
|
|
114
239
|
# Stage your changes
|
|
115
240
|
git add src/services/user.service.ts
|
|
116
241
|
|
|
117
|
-
#
|
|
242
|
+
# Review code quality and generate tests
|
|
118
243
|
testgen auto
|
|
119
244
|
```
|
|
120
245
|
|
|
246
|
+
**Review only:**
|
|
247
|
+
```bash
|
|
248
|
+
# Get code review for staged changes
|
|
249
|
+
testgen review
|
|
250
|
+
|
|
251
|
+
# Check the review
|
|
252
|
+
cat reviews/user.service.review.md
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
**Test generation only:**
|
|
256
|
+
```bash
|
|
257
|
+
# Generate tests without review
|
|
258
|
+
testgen test
|
|
259
|
+
```
|
|
260
|
+
|
|
121
261
|
**Output:**
|
|
122
262
|
```
|
|
123
263
|
🧪 AI-Powered Unit Test Generator with AST Analysis
|
|
@@ -143,10 +283,12 @@ testgen auto
|
|
|
143
283
|
```
|
|
144
284
|
|
|
145
285
|
**Benefits:**
|
|
286
|
+
- 🔍 **Quality Assurance**: Catch issues before they reach production
|
|
146
287
|
- ⚡ **Fast**: Only processes changed files
|
|
147
|
-
- 🎯 **Targeted**:
|
|
288
|
+
- 🎯 **Targeted**: Reviews and tests only modified functions
|
|
148
289
|
- 🔄 **CI/CD Ready**: Non-interactive, perfect for automation
|
|
149
290
|
- 🛡️ **Safe**: Preserves existing tests for unchanged functions
|
|
291
|
+
- 📊 **Trackable**: All reviews saved for historical reference
|
|
150
292
|
|
|
151
293
|
**What files are processed:**
|
|
152
294
|
- ✅ Source files with supported extensions (`.ts`, `.tsx`, `.js`, `.jsx`)
|
|
@@ -195,16 +337,52 @@ Generate tests for specific functions:
|
|
|
195
337
|
- Preserves existing tests for other functions
|
|
196
338
|
- Ideal for incremental test development
|
|
197
339
|
|
|
198
|
-
#### 4. Auto Mode
|
|
199
|
-
|
|
340
|
+
#### 4. Auto Mode (Unified)
|
|
341
|
+
Review code quality and generate tests automatically:
|
|
200
342
|
- Analyzes git diff (staged and unstaged changes)
|
|
201
|
-
- AI
|
|
202
|
-
- Generates
|
|
343
|
+
- AI reviews code for quality, bugs, performance, security
|
|
344
|
+
- Generates comprehensive review markdown files
|
|
345
|
+
- Creates tests for changed exported functions
|
|
203
346
|
- Non-interactive - perfect for CI/CD pipelines
|
|
204
347
|
- Use: `testgen auto`
|
|
205
348
|
|
|
349
|
+
#### 5. Review Mode
|
|
350
|
+
AI-powered code review only:
|
|
351
|
+
- Comprehensive analysis by senior-level AI reviewer
|
|
352
|
+
- Reviews code quality, potential bugs, performance issues, security vulnerabilities
|
|
353
|
+
- Uses AST tools to understand full context
|
|
354
|
+
- Generates structured markdown reports
|
|
355
|
+
- Use: `testgen review`
|
|
356
|
+
|
|
357
|
+
#### 6. Test Mode
|
|
358
|
+
Test generation only:
|
|
359
|
+
- Generates tests for changed functions
|
|
360
|
+
- Skips code review process
|
|
361
|
+
- Faster when you only need tests
|
|
362
|
+
- Use: `testgen test`
|
|
363
|
+
|
|
206
364
|
## How It Works
|
|
207
365
|
|
|
366
|
+
### Code Review Process
|
|
367
|
+
1. **Git Diff Analysis**: Detects changed files and functions
|
|
368
|
+
2. **AST Analysis**: Deep parse of code structure using Babel
|
|
369
|
+
3. **Context Understanding**: AI uses tools to analyze:
|
|
370
|
+
- Function implementations
|
|
371
|
+
- Dependencies and imports
|
|
372
|
+
- Type definitions
|
|
373
|
+
- Related code context
|
|
374
|
+
4. **Multi-Aspect Review**: Analyzes for:
|
|
375
|
+
- Code quality and best practices
|
|
376
|
+
- Potential bugs and edge cases
|
|
377
|
+
- Performance bottlenecks
|
|
378
|
+
- Security vulnerabilities
|
|
379
|
+
5. **Structured Report**: Generates markdown with:
|
|
380
|
+
- Severity-based findings
|
|
381
|
+
- Code snippets and fixes
|
|
382
|
+
- Positive observations
|
|
383
|
+
- Actionable recommendations
|
|
384
|
+
|
|
385
|
+
### Test Generation Process
|
|
208
386
|
1. **AST Analysis**: Parses your code using Babel to understand structure
|
|
209
387
|
2. **Dependency Resolution**: Analyzes imports and calculates correct paths
|
|
210
388
|
3. **AI Generation**: Uses AI to generate comprehensive test cases
|
|
@@ -236,21 +414,19 @@ The AI generates tests with:
|
|
|
236
414
|
|
|
237
415
|
### CI/CD Integration
|
|
238
416
|
|
|
239
|
-
|
|
417
|
+
CodeGuard modes are designed for continuous integration workflows:
|
|
240
418
|
|
|
241
|
-
**GitHub Actions
|
|
419
|
+
**GitHub Actions - Complete Workflow (Review + Tests):**
|
|
242
420
|
|
|
243
421
|
```yaml
|
|
244
|
-
name:
|
|
422
|
+
name: AI Code Review & Test Generation
|
|
245
423
|
|
|
246
424
|
on:
|
|
247
|
-
push:
|
|
248
|
-
branches: [ main, develop ]
|
|
249
425
|
pull_request:
|
|
250
|
-
branches: [ main ]
|
|
426
|
+
branches: [ main, develop ]
|
|
251
427
|
|
|
252
428
|
jobs:
|
|
253
|
-
|
|
429
|
+
review-and-test:
|
|
254
430
|
runs-on: ubuntu-latest
|
|
255
431
|
steps:
|
|
256
432
|
- uses: actions/checkout@v3
|
|
@@ -268,33 +444,98 @@ jobs:
|
|
|
268
444
|
- name: Install CodeGuard
|
|
269
445
|
run: npm install -g codeguard-testgen
|
|
270
446
|
|
|
271
|
-
- name:
|
|
447
|
+
- name: Review code and generate tests
|
|
272
448
|
env:
|
|
273
449
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
274
450
|
run: testgen auto
|
|
275
451
|
|
|
276
|
-
- name:
|
|
452
|
+
- name: Upload review reports
|
|
453
|
+
uses: actions/upload-artifact@v3
|
|
454
|
+
with:
|
|
455
|
+
name: code-reviews
|
|
456
|
+
path: reviews/
|
|
457
|
+
|
|
458
|
+
- name: Commit generated tests and reviews
|
|
277
459
|
run: |
|
|
278
460
|
git config --local user.email "action@github.com"
|
|
279
461
|
git config --local user.name "GitHub Action"
|
|
280
|
-
git add src/tests/
|
|
281
|
-
git commit -m "🤖
|
|
462
|
+
git add src/tests/ reviews/
|
|
463
|
+
git commit -m "🤖 AI code review + tests for changed functions" || echo "No changes"
|
|
282
464
|
git push
|
|
283
465
|
```
|
|
284
466
|
|
|
467
|
+
**GitHub Actions - Review Only:**
|
|
468
|
+
|
|
469
|
+
```yaml
|
|
470
|
+
name: AI Code Review
|
|
471
|
+
|
|
472
|
+
on:
|
|
473
|
+
pull_request:
|
|
474
|
+
branches: [ main ]
|
|
475
|
+
|
|
476
|
+
jobs:
|
|
477
|
+
code-review:
|
|
478
|
+
runs-on: ubuntu-latest
|
|
479
|
+
steps:
|
|
480
|
+
- uses: actions/checkout@v3
|
|
481
|
+
with:
|
|
482
|
+
fetch-depth: 0
|
|
483
|
+
|
|
484
|
+
- name: Setup Node.js
|
|
485
|
+
uses: actions/setup-node@v3
|
|
486
|
+
with:
|
|
487
|
+
node-version: '18'
|
|
488
|
+
|
|
489
|
+
- name: Install CodeGuard
|
|
490
|
+
run: npm install -g codeguard-testgen
|
|
491
|
+
|
|
492
|
+
- name: AI Code Review
|
|
493
|
+
env:
|
|
494
|
+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
495
|
+
run: testgen review
|
|
496
|
+
|
|
497
|
+
- name: Comment PR with review
|
|
498
|
+
uses: actions/github-script@v6
|
|
499
|
+
with:
|
|
500
|
+
script: |
|
|
501
|
+
const fs = require('fs');
|
|
502
|
+
const reviews = fs.readdirSync('reviews/');
|
|
503
|
+
for (const review of reviews) {
|
|
504
|
+
const content = fs.readFileSync(`reviews/${review}`, 'utf8');
|
|
505
|
+
github.rest.issues.createComment({
|
|
506
|
+
issue_number: context.issue.number,
|
|
507
|
+
owner: context.repo.owner,
|
|
508
|
+
repo: context.repo.repo,
|
|
509
|
+
body: `## AI Code Review: ${review}\n\n${content}`
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
```
|
|
513
|
+
|
|
285
514
|
**GitLab CI Example:**
|
|
286
515
|
|
|
287
516
|
```yaml
|
|
288
|
-
|
|
289
|
-
stage:
|
|
517
|
+
review-and-test:
|
|
518
|
+
stage: quality
|
|
290
519
|
script:
|
|
291
520
|
- npm install -g codeguard-testgen
|
|
292
|
-
- testgen auto
|
|
521
|
+
- testgen auto # Review + tests
|
|
293
522
|
artifacts:
|
|
294
523
|
paths:
|
|
524
|
+
- reviews/
|
|
295
525
|
- src/tests/
|
|
296
526
|
only:
|
|
297
527
|
- merge_requests
|
|
528
|
+
|
|
529
|
+
review-only:
|
|
530
|
+
stage: quality
|
|
531
|
+
script:
|
|
532
|
+
- npm install -g codeguard-testgen
|
|
533
|
+
- testgen review
|
|
534
|
+
artifacts:
|
|
535
|
+
reports:
|
|
536
|
+
codequality: reviews/
|
|
537
|
+
only:
|
|
538
|
+
- merge_requests
|
|
298
539
|
```
|
|
299
540
|
|
|
300
541
|
**Pre-commit Hook:**
|
|
@@ -303,11 +544,24 @@ generate-tests:
|
|
|
303
544
|
#!/bin/bash
|
|
304
545
|
# .git/hooks/pre-commit
|
|
305
546
|
|
|
306
|
-
#
|
|
547
|
+
# Review code and generate tests for staged changes
|
|
307
548
|
testgen auto
|
|
308
549
|
|
|
309
|
-
# Add generated tests to commit
|
|
310
|
-
git add src/tests/
|
|
550
|
+
# Add generated tests and reviews to commit
|
|
551
|
+
git add src/tests/ reviews/
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
**Pre-push Hook (Review Only):**
|
|
555
|
+
|
|
556
|
+
```bash
|
|
557
|
+
#!/bin/bash
|
|
558
|
+
# .git/hooks/pre-push
|
|
559
|
+
|
|
560
|
+
# Quick code review before pushing
|
|
561
|
+
testgen review
|
|
562
|
+
|
|
563
|
+
# Show review summary
|
|
564
|
+
echo "📊 Code Review Complete - Check reviews/ directory"
|
|
311
565
|
```
|
|
312
566
|
|
|
313
567
|
### Codebase Indexing
|
|
@@ -346,7 +600,7 @@ When legitimate bugs are found, they're reported with details for you to fix in
|
|
|
346
600
|
|
|
347
601
|
## Examples
|
|
348
602
|
|
|
349
|
-
### Example 1: Auto Mode
|
|
603
|
+
### Example 1: Complete Workflow (Auto Mode)
|
|
350
604
|
|
|
351
605
|
**Step 1: Make changes to a function**
|
|
352
606
|
```typescript
|
|
@@ -373,7 +627,16 @@ testgen auto
|
|
|
373
627
|
|
|
374
628
|
**Output:**
|
|
375
629
|
```
|
|
376
|
-
🔍 Scanning git changes...
|
|
630
|
+
🔍 Scanning git changes for review...
|
|
631
|
+
📝 Found changes in 1 file(s)
|
|
632
|
+
|
|
633
|
+
🔄 Reviewing: src/services/user.service.ts
|
|
634
|
+
📦 Changed functions: createUser
|
|
635
|
+
✅ Review completed
|
|
636
|
+
|
|
637
|
+
============================================================
|
|
638
|
+
|
|
639
|
+
🔍 Scanning git changes for testing...
|
|
377
640
|
📝 Found changes in 1 file(s)
|
|
378
641
|
|
|
379
642
|
🔄 Processing: src/services/user.service.ts
|
|
@@ -381,7 +644,26 @@ testgen auto
|
|
|
381
644
|
✅ Tests generated successfully
|
|
382
645
|
```
|
|
383
646
|
|
|
384
|
-
**
|
|
647
|
+
**Results:**
|
|
648
|
+
- `reviews/user.service.review.md` created with code quality analysis
|
|
649
|
+
- Only `createUser` gets new tests, `deleteUser` tests remain unchanged!
|
|
650
|
+
|
|
651
|
+
**Review excerpt:**
|
|
652
|
+
```markdown
|
|
653
|
+
### 🟡 Medium Priority Issues
|
|
654
|
+
|
|
655
|
+
#### [Code Quality] Weak Email Validation
|
|
656
|
+
**Function**: `createUser`
|
|
657
|
+
**Issue**: Email validation only checks for '@' symbol, not comprehensive
|
|
658
|
+
|
|
659
|
+
**Recommended Fix**:
|
|
660
|
+
```typescript
|
|
661
|
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
662
|
+
if (!emailRegex.test(email)) {
|
|
663
|
+
throw new Error('Invalid email format');
|
|
664
|
+
}
|
|
665
|
+
```
|
|
666
|
+
```
|
|
385
667
|
|
|
386
668
|
### Example 2: Testing a User Service
|
|
387
669
|
|
|
@@ -425,10 +707,10 @@ describe('UserService', () => {
|
|
|
425
707
|
|
|
426
708
|
## Troubleshooting
|
|
427
709
|
|
|
428
|
-
###
|
|
710
|
+
### Command Mode Issues
|
|
429
711
|
|
|
430
712
|
#### "Not a git repository"
|
|
431
|
-
|
|
713
|
+
The `auto`, `test`, and `review` commands require git to detect changes. Initialize git in your project:
|
|
432
714
|
```bash
|
|
433
715
|
git init
|
|
434
716
|
```
|
|
@@ -445,6 +727,14 @@ git status
|
|
|
445
727
|
git diff
|
|
446
728
|
```
|
|
447
729
|
|
|
730
|
+
#### Review/Test mode not working
|
|
731
|
+
Make sure you're using the correct command:
|
|
732
|
+
```bash
|
|
733
|
+
testgen auto # Review + tests
|
|
734
|
+
testgen review # Only review
|
|
735
|
+
testgen test # Only tests
|
|
736
|
+
```
|
|
737
|
+
|
|
448
738
|
#### "No exported functions changed"
|
|
449
739
|
Possible causes:
|
|
450
740
|
1. **AI model misconfigured**: Check your `codeguard.json` has a valid model name:
|
|
@@ -534,6 +824,8 @@ your-project/
|
|
|
534
824
|
│ └── tests/ # Generated tests
|
|
535
825
|
│ └── services/
|
|
536
826
|
│ └── user.service.test.ts
|
|
827
|
+
├── reviews/ # AI code reviews
|
|
828
|
+
│ └── user.service.review.md
|
|
537
829
|
└── .codeguard-cache/ # Optional index cache
|
|
538
830
|
```
|
|
539
831
|
|
package/dist/config.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export interface CodeGuardConfig {
|
|
|
13
13
|
testDir?: string;
|
|
14
14
|
extensions?: string[];
|
|
15
15
|
excludeDirs?: string[];
|
|
16
|
+
validationInterval?: number;
|
|
16
17
|
}
|
|
17
18
|
export interface Config {
|
|
18
19
|
extensions: string[];
|
|
@@ -29,6 +30,7 @@ export interface Config {
|
|
|
29
30
|
openai: string;
|
|
30
31
|
gemini: string;
|
|
31
32
|
};
|
|
33
|
+
validationInterval?: number;
|
|
32
34
|
}
|
|
33
35
|
export declare function loadConfig(): Config;
|
|
34
36
|
export declare function validateConfig(config: Config): void;
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC3C,OAAO,EAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,MAAM,CAAC,EAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC3C,OAAO,EAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,MAAM,CAAC,EAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,MAAM;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC3C,OAAO,EAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAQD,wBAAgB,UAAU,IAAI,MAAM,CA6EnC;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAuBnD"}
|
package/dist/config.js
CHANGED
|
@@ -76,7 +76,8 @@ function loadConfig() {
|
|
|
76
76
|
claude: config.models?.claude || DEFAULT_MODELS.claude,
|
|
77
77
|
openai: config.models?.openai || DEFAULT_MODELS.openai,
|
|
78
78
|
gemini: config.models?.gemini || DEFAULT_MODELS.gemini
|
|
79
|
-
}
|
|
79
|
+
},
|
|
80
|
+
validationInterval: config.validationInterval // undefined by default (no validation)
|
|
80
81
|
};
|
|
81
82
|
}
|
|
82
83
|
function validateConfig(config) {
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;AA6CA,gCA6EC;AAED,wCAuBC;AAnJD,yBAA0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
|
@@ -42,6 +42,10 @@ declare function searchReplaceBlock(filePath: string, search: string, replace: s
|
|
|
42
42
|
* Simpler than search_replace_block for adding new content
|
|
43
43
|
*/
|
|
44
44
|
declare function insertAtPosition(filePath: string, content: string, position?: 'beginning' | 'end' | 'after_imports' | 'before_first_describe', afterMarker?: string): Promise<any>;
|
|
45
|
+
/**
|
|
46
|
+
* Write code review findings to a markdown file in the reviews/ directory
|
|
47
|
+
*/
|
|
48
|
+
declare function writeReview(filePath: string, reviewContent: string): Promise<any>;
|
|
45
49
|
declare function executeTool(toolName: string, args: any): Promise<any>;
|
|
46
50
|
declare function generateTests(sourceFile: string): Promise<string>;
|
|
47
51
|
declare function generateTestsForFolder(): Promise<void>;
|
|
@@ -56,5 +60,5 @@ declare function validateAndFixCompleteTestFile(sourceFile: string, testFilePath
|
|
|
56
60
|
declare function generateTestsForFunctions(sourceFile: string, functionNames: string[]): Promise<string>;
|
|
57
61
|
declare function generateTestsForFunction(): Promise<void>;
|
|
58
62
|
declare function main(): Promise<void>;
|
|
59
|
-
export { main, generateTests, generateTestsForFolder, generateTestsForFunction, generateTestsForFunctions, validateAndFixCompleteTestFile, executeTool, analyzeFileAST, getFunctionAST, getImportsAST, getTypeDefinitions, getClassMethods, replaceFunctionTests, searchReplaceBlock, insertAtPosition, deleteLines, insertLines, replaceLines, CodebaseIndexer, TOOLS };
|
|
63
|
+
export { main, generateTests, generateTestsForFolder, generateTestsForFunction, generateTestsForFunctions, validateAndFixCompleteTestFile, executeTool, analyzeFileAST, getFunctionAST, getImportsAST, getTypeDefinitions, getClassMethods, replaceFunctionTests, searchReplaceBlock, insertAtPosition, deleteLines, insertLines, replaceLines, writeReview, CodebaseIndexer, TOOLS };
|
|
60
64
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;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