Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify file type for buildifier explicitly #352

Merged
merged 2 commits into from
Mar 4, 2025

Conversation

avdv
Copy link
Contributor

@avdv avdv commented Mar 4, 2025

When formatting Bazel files, buildifier needs to know the concrete file
type which it usually deduces from the file name which is impossible
when operating on stdin.

For example, the order of load statements in a WORKSPACE file is
significant and re-ordering might break it. (see bazelbuild/buildtools#1268)

When formatting Bazel files, buildifier needs to know the concrete file
type which it usually deduces from the file name which is impossible
when operating on stdin.

For example, the order of load statements in a WORKSPACE file is
significant and re-ordering might break it.
@avdv avdv force-pushed the fix-buildifier-type branch from eaed903 to f8c8945 Compare March 4, 2025 19:33
@raxod502
Copy link
Member

raxod502 commented Mar 4, 2025

If there's an option in this tool to supply the filename as a command-line argument, we can do that instead to avoid having to re-implement the inference ourselves. Merging this for now as an incremental improvement.

@raxod502 raxod502 merged commit 6ad9e94 into radian-software:main Mar 4, 2025
4 checks passed
@avdv
Copy link
Contributor Author

avdv commented Mar 4, 2025

If there's an option in this tool to supply the filename as a command-line argument, we can do that instead to avoid having to re-implement the inference ourselves. Merging this for now as an incremental improvement.

Currently, there is no such option for buildifier. Thanks for merging!

@avdv avdv deleted the fix-buildifier-type branch March 4, 2025 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants