mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 06:06:37 +03:00
feat(detector): deprecate --fast (now a no-op, full scan always)
Since the jsdom removal the static HTML/CSS analysis is fast (~4ms/file) and covers every rule, so the regex-only `--fast` path only loses coverage (it ran ~10 of 41 rules) for no real speed win. It's a foot-gun: a `--fast` scan can read "clean" because most rules silently don't run. Deprecate gracefully rather than hard-remove: the flag is still accepted (so existing CI scripts don't break) but ignored, with a one-line stderr notice, and the full scan always runs. Dropped from --help and the example. Removed the `--fast` suggestion from the many-files warning and from critique.md's scan guidance. Ships to users via a CLI release (npm) and rides the next skill release in the bundled detector. Tests updated to assert the deprecation behavior. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
772aa73aa3
commit
f7f2bfc800
@@ -720,9 +720,10 @@ describe('CLI', () => {
|
||||
expect(JSON.parse(stdout.trim())).toEqual([]);
|
||||
});
|
||||
|
||||
test('--fast mode works', () => {
|
||||
const { code } = run('--fast', path.join(FIXTURES, 'should-flag.html'));
|
||||
expect(code).toBe(2);
|
||||
test('--fast is accepted but deprecated (no-op, full scan still runs)', () => {
|
||||
const { code, stderr } = run('--fast', path.join(FIXTURES, 'should-flag.html'));
|
||||
expect(code).toBe(2); // still flags the planted anti-patterns via the full scan
|
||||
expect(stderr).toContain('--fast is deprecated');
|
||||
});
|
||||
|
||||
test('linked stylesheet detected (static HTML/CSS default)', () => {
|
||||
|
||||
@@ -21,7 +21,7 @@ describe('skill detector bundle', () => {
|
||||
test('critique references the bundled detector command', () => {
|
||||
const critique = fs.readFileSync(path.join(ROOT, 'skill/reference/critique.md'), 'utf-8');
|
||||
|
||||
expect(critique).toContain('node {{scripts_path}}/detect.mjs --json [--fast] [target]');
|
||||
expect(critique).toContain('node {{scripts_path}}/detect.mjs --json [target]');
|
||||
expect(critique).not.toContain('npx impeccable detect');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user