MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / hook_command_exists

Function hook_command_exists

atomic-agent/src/hooks/claude_code/settings.rs:155–163  ·  view source on GitHub ↗
(
    matchers: &[ClaudeHookMatcher],
    matcher_name: &str,
    command: &str,
)

Source from the content-addressed store, hash-verified

153}
154
155pub(crate) fn hook_command_exists(
156 matchers: &[ClaudeHookMatcher],
157 matcher_name: &str,
158 command: &str,
159) -> bool {
160 matchers.iter().any(|matcher| {
161 matcher.matcher == matcher_name && matcher.hooks.iter().any(|h| h.command == command)
162 })
163}
164
165pub(crate) fn add_hook_to_matcher(
166 matchers: &mut Vec<ClaudeHookMatcher>,

Callers 1

install_hooks_intoFunction · 0.70

Calls 1

iterMethod · 0.45

Tested by

no test coverage detected