codex-plugin-doctor 1.39.0 → 1.41.0
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
CHANGED
|
@@ -330,7 +330,7 @@ codex-plugin-doctor check . --json --runtime --verbose-runtime
|
|
|
330
330
|
|
|
331
331
|
`check --profile ci|strict|publish` applies named validation policies. `ci` keeps default behavior, `strict` fails on warnings, and `publish` fails on warnings while enabling runtime probing by default.
|
|
332
332
|
|
|
333
|
-
`check --explain` adds inline rule catalog context to text reports, including why a finding matters, a more detailed fix path,
|
|
333
|
+
`check --explain` adds a deduplicated `Next Actions` summary plus inline rule catalog context to text reports, including the problem summary, rule category, why a finding matters, a more detailed fix path, a compact example, and the matching `codex-plugin-doctor explain <finding-id>` follow-up command.
|
|
334
334
|
|
|
335
335
|
`check --badge-json` emits Shields endpoint-compatible JSON such as `{"schemaVersion":1,"label":"doctor","message":"PASS","color":"brightgreen"}`. `check --badge-markdown` emits a static shields.io Markdown badge for README or release notes. Badge output is intentionally limited to single package checks, not `check --installed`.
|
|
336
336
|
|
|
@@ -402,9 +402,9 @@ jobs:
|
|
|
402
402
|
runs-on: ubuntu-latest
|
|
403
403
|
steps:
|
|
404
404
|
- uses: actions/checkout@v5
|
|
405
|
-
- uses: Esquetta/CodexPluginDoctor@v1.
|
|
405
|
+
- uses: Esquetta/CodexPluginDoctor@v1.41.0
|
|
406
406
|
with:
|
|
407
|
-
version: "1.
|
|
407
|
+
version: "1.41.0"
|
|
408
408
|
path: .
|
|
409
409
|
runtime: "true"
|
|
410
410
|
policy: codex-publish
|
|
@@ -95,7 +95,7 @@ async function writeHook(hookPath, content, force) {
|
|
|
95
95
|
export async function removeGitHooks(targetPath) {
|
|
96
96
|
const rootPath = path.resolve(targetPath);
|
|
97
97
|
const hooksDir = path.join(rootPath, ".git", "hooks");
|
|
98
|
-
const hookNames = [`pre-commit${hookExtension}`, `pre-push${hookExtension}`, "pre-commit", "pre-push"];
|
|
98
|
+
const hookNames = Array.from(new Set([`pre-commit${hookExtension}`, `pre-push${hookExtension}`, "pre-commit", "pre-push"]));
|
|
99
99
|
const removed = [];
|
|
100
100
|
const skipped = [];
|
|
101
101
|
for (const name of hookNames) {
|
|
@@ -55,6 +55,15 @@ export function renderTextReport(result, options = {}) {
|
|
|
55
55
|
}
|
|
56
56
|
const failures = result.findings.filter((finding) => finding.severity === "fail");
|
|
57
57
|
const warnings = result.findings.filter((finding) => finding.severity === "warn");
|
|
58
|
+
if (explain) {
|
|
59
|
+
const nextActions = Array.from(new Set([...failures, ...warnings].map((finding) => finding.suggestedFix))).slice(0, 5);
|
|
60
|
+
if (nextActions.length > 0) {
|
|
61
|
+
lines.push("", "Next Actions", "------------");
|
|
62
|
+
for (const [index, action] of nextActions.entries()) {
|
|
63
|
+
lines.push(`${index + 1}. ${action}`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
58
67
|
const appendSection = (title, items, marker) => {
|
|
59
68
|
if (items.length === 0) {
|
|
60
69
|
return;
|
|
@@ -76,9 +85,12 @@ export function renderTextReport(result, options = {}) {
|
|
|
76
85
|
if (explain) {
|
|
77
86
|
const rule = findRuleDefinition(finding.id);
|
|
78
87
|
if (rule) {
|
|
88
|
+
lines.push(` Problem: ${rule.summary}`);
|
|
89
|
+
lines.push(` Rule: ${rule.category}, ${rule.defaultSeverity}`);
|
|
79
90
|
lines.push(` Why: ${rule.why}`);
|
|
80
91
|
lines.push(` Fix detail: ${rule.fix}`);
|
|
81
92
|
lines.push(` Example: ${rule.example}`);
|
|
93
|
+
lines.push(` Learn more: codex-plugin-doctor explain ${finding.id}`);
|
|
82
94
|
}
|
|
83
95
|
}
|
|
84
96
|
}
|
package/package.json
CHANGED