@opencodereview/core 1.9.1 → 2.0.1
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 +42 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# @opencodereview/core
|
|
2
|
+
|
|
3
|
+
> Core detection engine for Open Code Review
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @opencodereview/core
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { Scanner, DetectorRegistry } from '@opencodereview/core';
|
|
15
|
+
|
|
16
|
+
const scanner = new Scanner({
|
|
17
|
+
sla: 'L2',
|
|
18
|
+
ollamaUrl: 'http://localhost:11434'
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const result = await scanner.scan('src/');
|
|
22
|
+
console.log(result.score, result.grade, result.issues);
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## API
|
|
26
|
+
|
|
27
|
+
### Scanner
|
|
28
|
+
|
|
29
|
+
- `scan(path: string, options?: ScanOptions): Promise<ScanResult>`
|
|
30
|
+
- `scanDiff(base: string, head: string): Promise<DiffResult>`
|
|
31
|
+
|
|
32
|
+
### Detectors
|
|
33
|
+
|
|
34
|
+
- `deep-hallucination` - Detects AI hallucinated packages
|
|
35
|
+
- `stale-api` - Detects deprecated APIs
|
|
36
|
+
- `security-pattern` - Detects security vulnerabilities
|
|
37
|
+
- `logic-gap` - Detects empty catches and logic gaps
|
|
38
|
+
- `over-engineering` - Detects unnecessary complexity
|
|
39
|
+
|
|
40
|
+
## License
|
|
41
|
+
|
|
42
|
+
BSL-1.1 - See [LICENSE](../../LICENSE)
|