Repository navigation
Conversation
|
This is ready for maintainer review. It reuses the existing |
9fb5e7b to
219a3a9
Compare
|
Rebased onto current |
219a3a9 to
38fffed
Compare
… filters Tools built on CodeGraph need to know whether a file is a test, and nothing on the CLI said so. They kept their own naming rules, which drift from the one CodeGraph uses for search and `codegraph affected`. `codegraph files --json` now gives each file `isTest`, from that same predicate. `--tests` and `--no-tests` filter the list before any output format, `--format package` included. `codegraph node --file`, the same view as `codegraph_node` on a file, says "test file" in its header. Validation: 4 CLI cases fail on main and pass here. On express, flask, gin and excalidraw, `files --json` matches main row for row apart from the new field, and `--tests` and `--no-tests` split the list exactly by it. Of 20 source file views, 20 are byte-identical to main. Of 20 test file views, 19 differ only by the label; gin's binding_test.go is over the output cap, so the label moves the cut one line up and the range note says so. Explore doesn't use this view, and its budgets aren't touched. Fixes #1877 Original PR #1960 by @maxmilian. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @maxmilian! This landed as #3124 with your authorship, which closes #1877. We rebased it over |
Closes #1877.
Changes
isTestPathclassification asisTestincodegraph files --json.--testsand--no-testsfilters tocodegraph files.codegraph node --fileoutput.Verification
bun x tsc --noEmitbun x tscbun run copy-assetsbun x vitest run __tests__/cli-files-test-classification.test.tsbun x vitest run __tests__/cli-node-command.test.ts __tests__/cli-affected-test-conventions.test.tsgit diff --check