Skip to content

Add list --problems to show only entries and files with problems (#7) - #8

Merged
nrzz merged 1 commit into
nrzz:mainfrom
yoreva-01:feat/list-problems-filter
Oct 19, 2026
Merged

nrzz merged 1 commit into
nrzz:mainfrom
yoreva-01:feat/list-problems-filter

Conversation

@yoreva-01

Copy link
Copy Markdown
Contributor

What and why

Fixes #7.

Adds --problems to everyhook list to display only the hook entries and configuration files that have a problem, leaving out everything that is fine:

everyhook list --problems
everyhook list --problems --agent claude,codex --json
  • --problems filters entries to keep only those with problems.length > 0, and files with problems of their own or containing problem entries.
  • The closing line counts the entries, files, and problems shown (2 hooks in 3 files, 0 by everyhook; 3 problems).
  • When no problems are found, exit code is 0 and reports 0 hooks in 0 files, 0 by everyhook; 0 problems.
  • Integrates seamlessly with --agent, --hook, --event, and --project.
  • --json includes problems: true alongside filtered entries and files.
  • Passing --problems with a value or multiple times raises a usage error (exit 2).

How it was tested

  • Added automated tests in test/list.test.mjs verifying:
    • Filtering in both text and JSON with a throwaway world containing 1 valid entry and 3 distinct problem types (misspelt event, missing program, malformed file shape).
    • Combinations with --agent and --hook.
    • Empty report with exit 0 when no problems exist.
    • Usage errors for --problems with values, duplicates, or unsupported commands.
  • Verified test count alignment (313 automated tests) with test/readme.test.mjs.
  • Verified repository invariants and LF line endings with test/repo.test.mjs.
  • Ran full test suite via npm test across all 328 tests (278 passed, 0 failed, 50 skipped).

Checklist

  • npm test passes, and the change has a test
  • No new dependencies
  • Tests use a temporary folder, never a real home or config folder
  • A statement about how an agent behaves was put to the real binary (or the README and explain say docs)
  • Token cost: unchanged, or stated here and in the README's "What it costs in tokens"
  • README and CHANGELOG updated where they describe what changed

@nrzz
nrzz merged commit c64e471 into nrzz:main Oct 19, 2026
13 checks passed
nrzz added a commit that referenced this pull request Oct 19, 2026
list --problems shows only the entries and files with a problem, the lint
on its own, from the fourth outside pull request, #8 by @yoreva-01, for
the good first issue #7. The next good first issue is #9: list --ours,
only the entries everyhook wrote, across the agents.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@nrzz

nrzz commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Merged and released as 1.4.0, with your name in the changelog and the release notes. Thank you; the three cuts of list are yours, and this one is the lint on its own.

The suite was green on this machine (313 tests, 50 of them skipped without the agents' variables) and in CI on all three systems, test and real-agent jobs alike, before the merge. The README's test count you updated matched what node --test reports here, less the fifteen helper files.

If you want the next one, #9 is the fourth cut: list --ours, only the entries everyhook wrote, the set uninstall and restore act on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

list --problems: only the entries and files with a problem

2 participants