spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / diff / hooks / classify / is-noise-file.ts
12 lines · 423 BRaw
1import { isGeneratedFile } from './is-generated-file'
2import { isTestFile } from './is-test-file'
3
4/**
5 * Whether a changed file is hidden behind the pane's tests-and-generated
6 * line until the person asks to see it.
7 *
8 * @param path the file's path from the repository root
9 * @returns whether it is a test or a generated file
10 */
11export const isNoiseFile = (path: string) =>
12 isTestFile(path) || isGeneratedFile(path)