feat(gazelle): default-on .gitignore-skipping plus opt-in untracked-file skipping#1084
Draft
gregmagolan wants to merge 1 commit into
Draft
feat(gazelle): default-on .gitignore-skipping plus opt-in untracked-file skipping#1084gregmagolan wants to merge 1 commit into
gregmagolan wants to merge 1 commit into
Conversation
✨ Aspect Workflows Tasks📅 Fri May 15 19:14:30 UTC 2026 ✅ 16 successful tasks
Powered by Aspect Build · GitHub · X · LinkedIn · YouTube |
330df2f to
2649478
Compare
170056d to
b27fce5
Compare
jbedard
requested changes
May 15, 2026
…iles to gazelle task
b27fce5 to
5e89c16
Compare
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
Two new boolean flags on
aspect gazellethat close gaps in how gazelle interacts with git state, plus a couple of adjacent fixes to the status surface.--ignore-gitignored-files(default true)Gazelle's native ignore mechanisms (
.bazelignoreliteral paths,REPO.bazel ignore_directories([...])dir globs,# gazelle:excludeper-package directives) don't honor.gitignore. Without this flag every gitignored dir users want gazelle to skip —bazel-out/,node_modules/,.venv/,__pycache__/, build artifacts — has to be mirrored elsewhere. Defaults on to close that gap automatically: queriesgit ls-files --others --ignored --exclude-standard --directory -z, dedups results against.bazelignore+REPO.bazel+ directory symlinks gazelle doesn't follow anyway, and passes each surviving entry as--gazelle-flag=-exclude=<path>. Pass--ignore-gitignored-files=falseto opt out (rare — e.g., a gitignored file that gazelle's indexing needs to see).--ignore-untracked-files(default false)Symmetric mechanism for untracked files. When set, queries
git ls-files --others --exclude-standard --directory -zand passes each result as--gazelle-flag=-exclude=<path>(same dedup pipeline). Off by default because untracked files are typically work-in-progress the user wants gazelle to process; turn it on in pre-commit / pre-push hooks where you want only committed-state rules.Adjacent fixes / cleanups
is_runningshort-circuit that format already has. Now shows🔄 Gazelle task in progress...during the bazel build / diff phase.gazelle_resultsandformat_results:Soft fail,Scope all on change,Changed file pattern(previously kebab-case).Ignore-*row surfaces only when its value departs from default so a stock invocation has a clean Config row.Suggested release notes
aspect gazelle --ignore-gitignored-filesflag, defaulting on. Gazelle doesn't honor.gitignorenatively. With this default-on, the task queriesgit ls-files --others --ignored --exclude-standard --directoryon each invocation and passes each result as--gazelle-flag=-exclude=<path>, sobazel-out/,node_modules/,.venv/,__pycache__/, build artifacts no longer get walked. Pass--ignore-gitignored-files=falseto opt out. No-op on clean CI checkouts; deduped against.bazelignore+REPO.bazel ignore_directories()so we don't restate what gazelle already skips.aspect gazelle --ignore-untracked-filesflag, defaulting off. Symmetric mechanism for untracked files. Useful in pre-commit / pre-push hooks where you don't want BUILD rules generated for files you haven't checked in yet.WARNINGifgit ls-filesfails.🔄 Gazelle task in progress...placeholder.Soft fail,Scope all on change,Changed file pattern, …) — previously kebab-case.ASPECT_DEBUG=1,aspect gazelleandaspect formatlog atraceline with the exact subprocess command they're about to spawn (resolved flags / excludes / dirs / file list).Test plan
parse_bazelignoreandparse_repo_bazel_ignore_directories)._make_ignore_untrackedand_make_ignore_gitignored_disabledConfiguration-row coverage), PR-comment (17), BK annotation (21), plus the standard template / format / lint / delivery suites..gitignore-matched file on disk), runaspect gazelleand confirm the rendered Configuration row matches expectations and that the affected dirs don't get BUILD rules updated.