Skip to content

Commit 93c0e98

Browse files
committed
fix: address additional PR review comments
- Fix documentation: HIGH certainty section title (not all are auto-fixable) - Fix example: use fixed.applied.length instead of fixed.length - Remove misleading inline autoFixFn from missing_required_fields pattern (plugin-analyzer provides the proper fixer.fixRequiredFields)
1 parent 226ee2f commit 93c0e98

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/enhance/plugin-patterns.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ const pluginPatterns = {
5353
if (propKeys.length > 0 && (!schema.required || schema.required.length === 0)) {
5454
return {
5555
issue: 'No required fields declared',
56-
fix: 'Add required array with all mandatory fields',
57-
autoFixFn: (s) => ({ ...s, required: Object.keys(s.properties) })
56+
fix: 'Add required array with all mandatory fields'
57+
// autoFixFn is provided by plugin-analyzer which uses fixer.fixRequiredFields
5858
};
5959
}
6060
}

plugins/enhance/commands/enhance.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ Parse from $ARGUMENTS:
2727

2828
## Detection Categories
2929

30-
### HIGH Certainty (auto-fixable)
30+
### HIGH Certainty
3131

3232
| Pattern | Description | Auto-Fix |
3333
|---------|-------------|----------|
3434
| Missing additionalProperties | Schema allows extra fields | Add `"additionalProperties": false` |
3535
| Missing required fields | Parameters not marked required | Add to `required` array |
3636
| Version mismatch | plugin.json vs package.json | Sync versions |
37-
| Missing tool description | Tool has no description | Flag for manual fix |
37+
| Missing tool description | Tool has no description | Manual fix required |
3838

3939
### MEDIUM Certainty (verify context)
4040

@@ -93,7 +93,7 @@ console.log(report);
9393
// Apply fixes if requested
9494
if (applyFixes) {
9595
const fixed = await pluginAnalyzer.applyFixes(results);
96-
console.log(`Applied ${fixed.length} fixes`);
96+
console.log(`Applied ${fixed.applied.length} fixes`);
9797
}
9898
```
9999

0 commit comments

Comments
 (0)