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

Add user.bazelrc support to each workspace. #1161

Merged
merged 2 commits into from
Mar 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# `.bazelrc` is a Bazel configuration file.
# https://docs.bazel.build/versions/master/best-practices.html#using-the-bazelrc-file
# https://bazel.build/docs/best-practices#bazelrc-file

# Enable rustfmt for all targets in the workspace
build:rustfmt --aspects=//rust:defs.bzl%rustfmt_aspect
Expand All @@ -9,5 +9,9 @@ build:rustfmt --output_groups=+rustfmt_checks
build:clippy --aspects=//rust:defs.bzl%rust_clippy_aspect
build:clippy --output_groups=+clippy_checks

# https://bazel.googlesource.com/bazel/+/master/site/docs/windows.md#enable-symlink-support
startup --windows_enable_symlinks
# https://bazel.build/docs/windows#symlink
startup --windows_enable_symlinks

# This import should always be last to allow users to override
# settings for local development.
try-import %workspace%/user.bazelrc
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/examples/bazel-*
/examples/crate_universe/*/bazel-*
/docs/bazel-*
user.bazelrc

# rustfmt
*.rs.bk
Expand Down
6 changes: 5 additions & 1 deletion examples/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# `.bazelrc` is a Bazel configuration file.
# https://docs.bazel.build/versions/master/best-practices.html#using-the-bazelrc-file
# https://bazel.build/docs/best-practices#bazelrc-file

# Enable rustfmt for all targets in the workspace
build:rustfmt --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect
Expand All @@ -8,3 +8,7 @@ build:rustfmt --output_groups=+rustfmt_checks
# Enable clippy for all targets in the workspace
build:clippy --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect
build:clippy --output_groups=+clippy_checks

# This import should always be last to allow users to override
# settings for local development.
try-import %workspace%/user.bazelrc
6 changes: 5 additions & 1 deletion examples/crate_universe/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# `.bazelrc` is a Bazel configuration file.
# https://docs.bazel.build/versions/master/best-practices.html#using-the-bazelrc-file
# https://bazel.build/docs/best-practices#bazelrc-file

# Enable rustfmt for all targets in the workspace
build:rustfmt --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect
Expand All @@ -8,3 +8,7 @@ build:rustfmt --output_groups=+rustfmt_checks
# Enable clippy for all targets in the workspace
build:clippy --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect
build:clippy --output_groups=+clippy_checks

# This import should always be last to allow users to override
# settings for local development.
try-import %workspace%/user.bazelrc