mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-15 07:36:50 +03:00
Bump plugin + marketplace to 4.0.1 and sync the regenerated provider output: the guarded hook commands from issue #399 (a missing hook file exits 0 instead of crashing every turn of a user-level install), the canon standing exit, the visualize flow, the two shipped subagents, and the interactive-spine fixes from today's live testing. Detector count validates at 59 with undersized-ui-text. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
19 lines
766 B
JavaScript
19 lines
766 B
JavaScript
import { getAntipattern } from './registry/antipatterns.mjs';
|
|
|
|
function getAP(id) {
|
|
return getAntipattern(id);
|
|
}
|
|
|
|
function finding(id, filePath, snippet, line = 0) {
|
|
const ap = getAP(id);
|
|
const base = { antipattern: id, name: ap.name, description: ap.description, severity: ap.severity || 'warning', category: ap.category || null, file: filePath, line, snippet };
|
|
// Advisory findings are detected but reported separately and never counted as
|
|
// failures. Carry the flag on the finding so every consumer (CLI, JSON, hook)
|
|
// can partition without a registry lookup. Only stamped when true to keep the
|
|
// finding shape stable for the vast majority of rules.
|
|
if (ap.advisory === true) base.advisory = true;
|
|
return base;
|
|
}
|
|
|
|
export { getAP, finding };
|