Skip to content

feat: CLI with check command, stdin, directory scanning#2

Merged
hermanngeorge15 merged 1 commit into
mainfrom
feat/cli
Apr 2, 2026
Merged

feat: CLI with check command, stdin, directory scanning#2
hermanngeorge15 merged 1 commit into
mainfrom
feat/cli

Conversation

@hermanngeorge15
Copy link
Copy Markdown
Contributor

Summary

  • Full CLI implementation with check subcommand supporting file, directory, and stdin (-) input modes
  • Recursive directory scanning for .md, .yaml, .yml, .txt, .toml files
  • --format json and --patterns <dir> options
  • Per-file allowlist parsing with per-line injection-scanner:ignore suppression
  • Exit code 0 = clean, 1 = findings found
  • 11 CLI integration tests covering all modes (clean, injected, stdin, JSON, directory, nonexistent path, suppressions)

Test plan

  • cargo test — 39 tests pass (28 existing + 11 new CLI tests)
  • cargo clippy -- -D warnings — clean
  • cargo fmt — applied
  • Smoke tested: clean file (exit 0), injected file (exit 1), JSON output, stdin mode, directory scan

🤖 Generated with Claude Code

Implements the complete CLI entry point:
- check subcommand with path, --format, --patterns args
- stdin mode (check -) for piping content
- recursive directory scanning (md, yaml, yml, txt, toml)
- per-file allowlist parsing and per-line suppression
- exit code 0 = clean, 1 = findings
- 11 CLI integration tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hermanngeorge15 hermanngeorge15 merged commit a9eea00 into main Apr 2, 2026
2 checks passed
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.

1 participant