Skip to content
Open
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
32 changes: 30 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
###############################################################################
## Bazel Configuration Flags
##
## `.bazelrc` is a Bazel configuration file.
## https://bazel.build/docs/best-practices#bazelrc-file
###############################################################################

test --test_output=errors

# Fix the excessive rebuilding when using anything that depends on protobuf rules
# See https://github.com/bazelbuild/buildtools/issues/744
common --incompatible_strict_action_env
common --enable_bzlmod

try-import user.bazelrc

# To update these lines, execute
# `bazel run @rules_bazel_integration_test//tools:update_deleted_packages`
build --deleted_packages=examples/check_glob,examples/optional_attributes
Expand All @@ -15,3 +20,26 @@ query --deleted_packages=examples/check_glob,examples/optional_attributes
# Enable the aspect
build --aspects=//shellcheck:shellcheck_aspect.bzl%shellcheck_aspect
build --output_groups=+shellcheck_checks

###############################################################################
## Incompatibility flags
###############################################################################

# https://github.com/bazelbuild/bazel/issues/8195
build --incompatible_disallow_empty_glob=true

# https://github.com/bazelbuild/bazel/issues/12821
build --nolegacy_external_runfiles

# https://github.com/bazelbuild/bazel/issues/23043.
build --incompatible_autoload_externally=

###############################################################################
## Custom user flags
##
## This should always be the last thing in the `.bazelrc` file to ensure
## consistent behavior when setting flags in that file as `.bazelrc` files are
## evaluated top to bottom.
###############################################################################

try-import user.bazelrc
2 changes: 0 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ filegroup(
name = "distribution",
srcs = [
"BUILD.bazel",
"def.bzl",
"deps.bzl",
"CHANGELOG.md",
"LICENSE",
"MODULE.bazel",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ bazel run @rules_shellcheck//:shellcheck -- <parameters>
And you can define a lint target:

```starlark
load("@rules_shellcheck//:def.bzl", "shellcheck", "shellcheck_test")
load("@rules_shellcheck//shellcheck:shellcheck_test.bzl", "shellcheck_test")

shellcheck_test(
name = "shellcheck_test",
Expand Down
4 changes: 0 additions & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
workspace(name = "rules_shellcheck")

load("//:deps.bzl", "shellcheck_dependencies")

shellcheck_dependencies()
9 changes: 0 additions & 9 deletions def.bzl

This file was deleted.

9 changes: 0 additions & 9 deletions deps.bzl

This file was deleted.

2 changes: 1 addition & 1 deletion examples/check_glob/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@rules_shellcheck//:def.bzl", "shellcheck_test")
load("@rules_shellcheck//shellcheck:shellcheck_test.bzl", "shellcheck_test")

shellcheck_test(
name = "shellcheck_all",
Expand Down
2 changes: 1 addition & 1 deletion examples/optional_attributes/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@rules_shellcheck//:def.bzl", "shellcheck_test")
load("@rules_shellcheck//shellcheck:shellcheck_test.bzl", "shellcheck_test")

shellcheck_test(
name = "shellcheck_all",
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
load("@rules_shell//shell:sh_binary.bzl", "sh_binary")
load("//:def.bzl", "shellcheck_test")
load("//shellcheck:shellcheck_test.bzl", "shellcheck_test")

pkg_files(
name = "files",
Expand Down