Fix: refuse inert exact ignore-value entries (#662)

ignore-value stored exact values for rules that cannot extract one, so the entries never matched. Refuse them and point at "*" --file.

AI assistance: implemented with Cursor Grok 4.6.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Abdul Wahab
2026-08-28 05:43:36 +05:00
committed by Abdul Wahab
co-authored by Cursor
parent af2e8b3ac3
commit be87f5eb86
4 changed files with 38 additions and 0 deletions
+7
View File
@@ -115,6 +115,13 @@ describe('impeccable ignores CLI', () => {
expect(existsSync(join(root, '.impeccable', 'config.json'))).toBe(false);
});
test('rejects exact values for rules that cannot extract one', () => {
const result = run(['add-value', 'side-tab', 'Inter']);
expect(result.status).not.toBe(0);
expect(result.stderr).toMatch(/side-tab has no extractable ignore value.*add-value side-tab "\*" --file <glob>/);
expect(existsSync(join(root, '.impeccable', 'config.json'))).toBe(false);
});
test('removes an existing broad wildcard value ignore', () => {
mkdirSync(join(root, '.impeccable'), { recursive: true });
writeFileSync(join(root, '.impeccable', 'config.json'), JSON.stringify({