Skip to content

Add native -exclude to buildifier - #1486

Open
keith wants to merge 2 commits into
bazel-contrib:mainfrom
keith:ks/add-native-exclude-to-buildifier
Open

keith wants to merge 2 commits into
bazel-contrib:mainfrom
keith:ks/add-native-exclude-to-buildifier

Conversation

@keith

@keith keith commented Aug 11, 2026

Copy link
Copy Markdown
Member

This gives cross platform consistency instead of relying on shell / bat
scripts that might differ depending on the tools you call.

This gives cross platform consistency instead of relying on shell / bat
scripts that might differ depending on the tools you call.
@keith
keith force-pushed the ks/add-native-exclude-to-buildifier branch from 2f733ff to 87b261f Compare August 11, 2026 17:46
@keith
keith marked this pull request as ready for review August 18, 2026 21:23
@keith
keith requested a review from a team as a code owner August 18, 2026 21:23
@keith
keith requested review from vladmos and removed request for a team August 18, 2026 21:23
@fmeum

fmeum commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

This is really useful, but the exclude syntax is pretty bespoke. Could we just match Bazel's glob() syntax? That would also allow us to populate the default excludes from .bazelignore and ignore_directories.

What do you think of also interpreting excludes relative to the workspace root, not the current working directory? This is especially relevant if they are added to .buildifier.json.

Smaller notes:

  • Make sure that unreadable directories that are excluded don't fail the run.
  • Also exclude files that match the pattern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants