chore(gitignore): match nested target/ for all crates, not just the repo root#296
Merged
Conversation
…epo root The repo has 7 Rust crates besides the root: affinescriptiser/, runtime/, distributions/rattlescript/, tools/affine-doc/, tools/affine-pkg/, tools/affinescript-dap/, tools/affinescript-lsp/ Each builds to its own sibling `target/` directory. The previous rule `/target/` was anchored to the repo root and only caught one of the seven — `git status` was showing e.g. `tools/affinescript-lsp/target/` as untracked across several sessions, one stray `git add .` away from committing ~100 MB of build output. Drop the leading slash so the rule matches `target/` anywhere — the standard Rust convention. No other glob change; the OCaml `/_build/` remains anchored (we only have one `_build/`, at the root, and a non-anchored `_build/` would over-match user code). Verified post-fix that all three checked nested target/ dirs are now ignored (`git check-ignore` returns the path). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🔍 Hypatia Security ScanFindings: 40 issues detected
View findings[
{
"reason": "Stray AI.a2ml in root -- use 0-AI-MANIFEST.a2ml only",
"type": "banned",
"file": "AI.a2ml",
"action": "delete",
"rule_module": "root_hygiene",
"severity": "high"
},
{
"reason": "Superseded by 0-AI-MANIFEST.a2ml",
"type": "banned",
"file": "AI.djot",
"action": "delete",
"rule_module": "root_hygiene",
"severity": "high"
},
{
"reason": "Issue in quality.yml",
"type": "missing_workflow",
"file": "quality.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Issue in security-policy.yml",
"type": "missing_workflow",
"file": "security-policy.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
"type": "unpinned_action",
"file": "governance.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Action actions/checkout@v4 needs attention",
"type": "unpinned_action",
"file": "publish-jsr.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action denoland/setup-deno@v2 needs attention",
"type": "unpinned_action",
"file": "publish-jsr.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/affinescript/affinescript/affinescript-deno-test/example/smoke_driver.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/affinescript/affinescript/affinescript-deno-test/cli.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/affinescript/affinescript/affinescript-deno-test/mod.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
hyperpolymath
added a commit
that referenced
this pull request
May 20, 2026
`affinescript.install` (and any sibling `*.install` files for future opam packages declared in `dune-project`) is regenerated by dune on every `dune build`. It was showing up as untracked across recent sessions, one stray `git add .` away from being committed alongside the regular source changes. `*.install` is the standard pattern: dune emits one per `(package ...)` declaration in `dune-project`, and they're consumed only by opam during install — not durable repo content. Same shape as the previous `target/` glob fix (#296) — match anywhere, not just the repo root, so any future nested opam package's `.install` file is covered too. Verified post-fix: `git check-ignore affinescript.install` returns the path; `git status` no longer lists it as untracked. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
affinescriptiser/,runtime/,distributions/rattlescript/,tools/affine-doc/,tools/affine-pkg/,tools/affinescript-dap/,tools/affinescript-lsp/). Each builds to its own siblingtarget/./target/was anchored to the repo root and only caught one of the seven.git statuswas showing e.g.tools/affinescript-lsp/target/as untracked across several sessions, one straygit add .away from committing ~100 MB of build output.target/matches anywhere — the standard Rust convention.Why not unanchor the others too
Only the Rust
target/has the nested-crate problem./_build/stays anchored: there's exactly one OCaml dune build dir at the root, and an unanchored_build/could over-match user code that happens to live in a directory called_build. Same reasoning for the other anchored entries.Verification
After the fix,
git check-ignoreconfirms the nested dirs are now ignored:Test plan
git check-ignorereturns each nestedtarget/pathgit statusshows and whatgit add .accidentally stages)🤖 Generated with Claude Code