diff --git a/.bazelrc b/.bazelrc
index 15df5cb2..e15d307f 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -3,8 +3,8 @@
# This lets us glob() up all the files inside the examples to make them inputs to tests
# (Note, we cannot use `common --deleted_packages` because the bazel version command doesn't support it)
# To update these lines, run `bazel run @rules_bazel_integration_test//tools:update_deleted_packages`.
-build --deleted_packages=examples/bzlformat/simple,examples/bzlformat/simple/mockascript,examples/bzlformat/simple/mockascript/internal,examples/bzlmod_e2e,examples/bzlmod_e2e/header,examples/bzlmod_e2e/mockascript,examples/bzlmod_e2e/mockascript/internal,examples/bzlmod_e2e/srcs/Bar,examples/bzlmod_e2e/srcs/Foo,examples/markdown/simple,examples/markdown/simple/bar,examples/updatesrc/simple,examples/updatesrc/simple/header,examples/updatesrc/simple/srcs/Bar,examples/updatesrc/simple/srcs/Foo,tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace,tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace/foo,tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace/foo/bar,tests/bzltidy_tests/workspace,tests/bzltidy_tests/workspace/child_workspaces/bar,tests/bzltidy_tests/workspace/child_workspaces/foo,tests/updatesrc_tests/workspace/diff_and_update_test,tests/updatesrc_tests/workspace/diff_and_update_test/with_custom_values,tests/updatesrc_tests/workspace/diff_and_update_test/with_defaults,tests/updatesrc_tests/workspace/letters
-query --deleted_packages=examples/bzlformat/simple,examples/bzlformat/simple/mockascript,examples/bzlformat/simple/mockascript/internal,examples/bzlmod_e2e,examples/bzlmod_e2e/header,examples/bzlmod_e2e/mockascript,examples/bzlmod_e2e/mockascript/internal,examples/bzlmod_e2e/srcs/Bar,examples/bzlmod_e2e/srcs/Foo,examples/markdown/simple,examples/markdown/simple/bar,examples/updatesrc/simple,examples/updatesrc/simple/header,examples/updatesrc/simple/srcs/Bar,examples/updatesrc/simple/srcs/Foo,tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace,tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace/foo,tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace/foo/bar,tests/bzltidy_tests/workspace,tests/bzltidy_tests/workspace/child_workspaces/bar,tests/bzltidy_tests/workspace/child_workspaces/foo,tests/updatesrc_tests/workspace/diff_and_update_test,tests/updatesrc_tests/workspace/diff_and_update_test/with_custom_values,tests/updatesrc_tests/workspace/diff_and_update_test/with_defaults,tests/updatesrc_tests/workspace/letters
+build --deleted_packages=examples/bzlformat/simple,examples/bzlformat/simple/mockascript,examples/bzlformat/simple/mockascript/internal,examples/bzlmod_e2e,examples/bzlmod_e2e/header,examples/bzlmod_e2e/mockascript,examples/bzlmod_e2e/mockascript/internal,examples/bzlmod_e2e/srcs/Bar,examples/bzlmod_e2e/srcs/Foo,examples/markdown/simple,examples/markdown/simple/bar,examples/tools/workspace,examples/updatesrc/simple,examples/updatesrc/simple/header,examples/updatesrc/simple/srcs/Bar,examples/updatesrc/simple/srcs/Foo,tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace,tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace/foo,tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace/foo/bar,tests/bzltidy_tests/workspace,tests/bzltidy_tests/workspace/child_workspaces/bar,tests/bzltidy_tests/workspace/child_workspaces/foo,tests/updatesrc_tests/workspace/diff_and_update_test,tests/updatesrc_tests/workspace/diff_and_update_test/with_custom_values,tests/updatesrc_tests/workspace/diff_and_update_test/with_defaults,tests/updatesrc_tests/workspace/letters
+query --deleted_packages=examples/bzlformat/simple,examples/bzlformat/simple/mockascript,examples/bzlformat/simple/mockascript/internal,examples/bzlmod_e2e,examples/bzlmod_e2e/header,examples/bzlmod_e2e/mockascript,examples/bzlmod_e2e/mockascript/internal,examples/bzlmod_e2e/srcs/Bar,examples/bzlmod_e2e/srcs/Foo,examples/markdown/simple,examples/markdown/simple/bar,examples/tools/workspace,examples/updatesrc/simple,examples/updatesrc/simple/header,examples/updatesrc/simple/srcs/Bar,examples/updatesrc/simple/srcs/Foo,tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace,tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace/foo,tests/bzlformat_tests/tools_tests/missing_pkgs_tests/workspace/foo/bar,tests/bzltidy_tests/workspace,tests/bzltidy_tests/workspace/child_workspaces/bar,tests/bzltidy_tests/workspace/child_workspaces/foo,tests/updatesrc_tests/workspace/diff_and_update_test,tests/updatesrc_tests/workspace/diff_and_update_test/with_custom_values,tests/updatesrc_tests/workspace/diff_and_update_test/with_defaults,tests/updatesrc_tests/workspace/letters
# Import Shared settings
import %workspace%/shared.bazelrc
diff --git a/.bazelversion b/.bazelversion
index ae9a76b9..6da4de57 100644
--- a/.bazelversion
+++ b/.bazelversion
@@ -1 +1 @@
-8.0.0
+8.4.1
diff --git a/.bcr/presubmit.yml b/.bcr/presubmit.yml
index 816347ba..964ae9e0 100644
--- a/.bcr/presubmit.yml
+++ b/.bcr/presubmit.yml
@@ -2,7 +2,7 @@ bcr_test_module:
module_path: "examples/bzlmod_e2e"
matrix:
platform: ["macos", "ubuntu2004"]
- bazel: ["8.0.0"]
+ bazel: ["8.1.1"]
tasks:
run_tests:
name: "Run test module"
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..298125ea
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,6 @@
+# Configure shfmt (https://github.com/patrickvane/shfmt)
+
+[*.sh]
+indent_style = space
+indent_size = 2
+case_indent = true
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index eeefba7f..e0bf6de6 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -18,7 +18,7 @@ concurrency:
cancel-in-progress: true
jobs:
all_ci_tests:
- runs-on: ubuntu-22.04
+ runs-on: ubuntu-24.04
needs:
- tidy_and_test_matrix
- integration_test_matrix
@@ -38,22 +38,16 @@ jobs:
- test: '@@//examples/bzlformat:simple_test_bazel_.bazelversion'
runner: macos-13
enable_bzlmod: true
- - test: '@@//examples/bzlformat:simple_test_bazel_last_green'
- runner: ubuntu-22.04
- enable_bzlmod: true
- - test: '@@//examples/bzlformat:simple_test_bazel_last_green'
- runner: macos-13
- enable_bzlmod: true
- test: '@@//examples/markdown:simple_test_bazel_.bazelversion'
runner: ubuntu-22.04
enable_bzlmod: true
- test: '@@//examples/markdown:simple_test_bazel_.bazelversion'
runner: macos-13
enable_bzlmod: true
- - test: '@@//examples/markdown:simple_test_bazel_last_green'
+ - test: '@@//examples/tools:tools_test_bazel_.bazelversion'
runner: ubuntu-22.04
enable_bzlmod: true
- - test: '@@//examples/markdown:simple_test_bazel_last_green'
+ - test: '@@//examples/tools:tools_test_bazel_.bazelversion'
runner: macos-13
enable_bzlmod: true
- test: '@@//examples/updatesrc:simple_test_bazel_.bazelversion'
@@ -62,36 +56,18 @@ jobs:
- test: '@@//examples/updatesrc:simple_test_bazel_.bazelversion'
runner: macos-13
enable_bzlmod: true
- - test: '@@//examples/updatesrc:simple_test_bazel_last_green'
- runner: ubuntu-22.04
- enable_bzlmod: true
- - test: '@@//examples/updatesrc:simple_test_bazel_last_green'
- runner: macos-13
- enable_bzlmod: true
- test: '@@//examples:bzlmod_e2e_test_bazel_.bazelversion'
runner: ubuntu-22.04
enable_bzlmod: true
- test: '@@//examples:bzlmod_e2e_test_bazel_.bazelversion'
runner: macos-13
enable_bzlmod: true
- - test: '@@//examples:bzlmod_e2e_test_bazel_last_green'
- runner: ubuntu-22.04
- enable_bzlmod: true
- - test: '@@//examples:bzlmod_e2e_test_bazel_last_green'
- runner: macos-13
- enable_bzlmod: true
- test: '@@//tests/bzlformat_tests/tools_tests/missing_pkgs_tests:missing_pkgs_test_bazel_.bazelversion'
runner: ubuntu-22.04
enable_bzlmod: true
- test: '@@//tests/bzlformat_tests/tools_tests/missing_pkgs_tests:missing_pkgs_test_bazel_.bazelversion'
runner: macos-13
enable_bzlmod: true
- - test: '@@//tests/bzlformat_tests/tools_tests/missing_pkgs_tests:missing_pkgs_test_bazel_last_green'
- runner: ubuntu-22.04
- enable_bzlmod: true
- - test: '@@//tests/bzlformat_tests/tools_tests/missing_pkgs_tests:missing_pkgs_test_bazel_last_green'
- runner: macos-13
- enable_bzlmod: true
- test: '@@//tests/bzlrelease_tests/rules_tests/generate_release_notes_tests:generate_release_notes_test'
runner: ubuntu-22.04
enable_bzlmod: true
@@ -125,26 +101,23 @@ jobs:
- test: '@@//tests/shlib_tests/lib_tests/github_tests:get_gh_auth_status_test'
runner: ubuntu-22.04
enable_bzlmod: true
- - test: '@@//tests/shlib_tests/lib_tests/github_tests:get_gh_changelog_test'
+ - test: '@@//tests/shlib_tests/lib_tests/github_tests:get_gh_changelog_organized_test'
runner: ubuntu-22.04
enable_bzlmod: true
- - test: '@@//tests/updatesrc_tests:updatesrc_test_bazel_.bazelversion'
+ - test: '@@//tests/shlib_tests/lib_tests/github_tests:get_gh_changelog_test'
runner: ubuntu-22.04
enable_bzlmod: true
- test: '@@//tests/updatesrc_tests:updatesrc_test_bazel_.bazelversion'
- runner: macos-13
- enable_bzlmod: true
- - test: '@@//tests/updatesrc_tests:updatesrc_test_bazel_last_green'
runner: ubuntu-22.04
enable_bzlmod: true
- - test: '@@//tests/updatesrc_tests:updatesrc_test_bazel_last_green'
+ - test: '@@//tests/updatesrc_tests:updatesrc_test_bazel_.bazelversion'
runner: macos-13
enable_bzlmod: true
runs-on: ${{ matrix.runner }}
env:
CC: clang
steps:
- - uses: actions/checkout@cbb722410c2e876e24abbe8de2cc27693e501dcb
+ - uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
- uses: cgrindel/gha_set_up_bazel@v1
with:
bazel_disk_cache_dir: ""
@@ -170,7 +143,7 @@ jobs:
- ubuntu-22.04
runs-on: ${{ matrix.runner }}
steps:
- - uses: actions/checkout@cbb722410c2e876e24abbe8de2cc27693e501dcb
+ - uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
- uses: cgrindel/gha_set_up_bazel@v1
with:
bazel_disk_cache_dir: ""
diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml
index 123157af..34eff6f9 100644
--- a/.github/workflows/create_release.yml
+++ b/.github/workflows/create_release.yml
@@ -33,7 +33,7 @@ jobs:
CC: clang
steps:
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
+ - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- uses: cgrindel/gha_set_up_bazel@v1
with:
repo_name: bazel-starlib
diff --git a/BUILD.bazel b/BUILD.bazel
index 6b0968f5..fdfba8fa 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -44,6 +44,12 @@ bzlformat_pkg(name = "bzlformat")
bzlformat_missing_pkgs(name = "bzlformat_missing_pkgs")
+# MARK: - Format using rules_lint
+
+alias(
+ name = "format",
+ actual = "//tools/format",
+)
# MARK: - Update Source Files
updatesrc_update_all(name = "update_all")
@@ -61,6 +67,7 @@ tidy(
":go_mod_tidy",
":gazelle_update_repos",
":update_build_files",
+ ":format",
],
)
@@ -169,6 +176,9 @@ _RUNTIME_PKGS = [
"//shlib/rules",
"//shlib/rules/private",
"//shlib/tools",
+ "//tools/gh",
+ "//tools/git",
+ "//tools/tar",
"//updatesrc",
"//updatesrc/private",
]
@@ -207,6 +217,7 @@ _INTEGRATION_TEST_PKGS = [
"//examples/bzlformat",
"//examples/markdown",
"//examples/updatesrc",
+ "//examples/tools",
"//tests/bzlformat_tests/tools_tests/missing_pkgs_tests",
"//tests/bzlrelease_tests/rules_tests/generate_release_notes_tests",
"//tests/bzlrelease_tests/rules_tests/generate_workspace_snippet_tests",
diff --git a/CLAUDE.md b/CLAUDE.md
new file mode 100644
index 00000000..7d9c7ddb
--- /dev/null
+++ b/CLAUDE.md
@@ -0,0 +1,156 @@
+# CLAUDE.md
+
+This file provides guidance to Claude Code (claude.ai/code) when working with code in this
+repository.
+
+## Overview
+
+Bazel Starlib is a collection of projects containing rulesets and libraries for Bazel projects.
+The repository is organized as a monorepo with multiple related Bazel projects:
+
+- **bazeldoc**: Generate Starlark documentation using Bazel Stardoc
+- **bzlformat**: Format Bazel Starlark files using Buildifier
+- **bzllib**: Collection of Starlark libraries
+- **bzlrelease**: Automate release generation using GitHub Actions
+- **bzltidy**: Collect Bazel actions to keep source files up-to-date
+- **markdown**: Maintain markdown files
+- **shlib**: Shell libraries for implementing binaries, libraries, and tests
+- **updatesrc**: Copy files from Bazel output directories to workspace
+
+## Common Commands
+
+### Development Workflow
+
+```bash
+# Quick source file updates (most common during development)
+bazel run //:update_files
+
+# Full tidy operation (runs formatting, updates source files)
+bazel run //:tidy
+
+# Format all code using rules_lint
+bazel run //:format
+
+# Update all generated source files
+bazel run //:update_all
+
+# Tidy all child workspaces
+bazel run //:tidy_all
+
+# Tidy only modified workspaces
+bazel run //:tidy_modified
+```
+
+### Golang Dependencies
+
+```bash
+# Add a new Go dependency
+bazel run @io_bazel_rules_go//go -- github.com/sweet/go_pkg
+
+# Update go.mod and Bazel files
+bazel run //:go_mod_tidy
+bazel run //:gazelle_update_repos
+bazel run //:update_build_files
+```
+
+### Formatting and Linting
+
+```bash
+# Format all source files
+bazel run //:format
+
+# Find missing bzlformat packages
+bazel run //:bzlformat_missing_pkgs
+
+# Fix missing bzlformat packages
+bazel run //:bzlformat_missing_pkgs_fix
+```
+
+### Testing
+
+```bash
+# Run integration tests (smoke tests)
+bazel test //:smoke_integration_tests
+
+# Run all integration tests
+bazel test //:all_integration_tests
+
+# Run with CI configuration
+bazel test --config=ci //...
+```
+
+### Build Configuration
+
+```bash
+# Build with remote cache
+bazel build --config=cache //...
+
+# Build without any caches
+bazel build --config=no_cache //...
+```
+
+## Architecture
+
+### Module Structure
+
+Each project follows a consistent structure:
+
+- `defs.bzl`: Public API exports
+- `private/`: Internal implementation files
+- `tools/`: Executable scripts and binaries
+- `README.md`: Project-specific documentation
+
+### Key Build Patterns
+
+**Bzlmod Support**: The repository uses Bzlmod with `MODULE.bazel` as the primary dependency
+management system, with legacy `WORKSPACE` support maintained.
+
+**Integration Testing**: Extensive integration test infrastructure using
+`rules_bazel_integration_test` with child workspaces in `/examples/` and `/tests/`.
+
+**Code Generation**: Many projects generate documentation, build files, and other artifacts
+that need to be kept in sync using the `updatesrc` system.
+
+**Shell Library Pattern**: The `shlib` project provides reusable shell functions following a
+library loading pattern with `cgrindel_bazel_shlib_lib_*_loaded()` functions.
+
+### Toolchain Integration
+
+- **Git Toolchain**: Custom git toolchain via `//tools/git`
+- **Gazelle**: Automated BUILD file generation for Go code
+- **Buildifier**: Starlark file formatting and linting
+- **Stardoc**: Documentation generation for Starlark rules
+
+### Configuration Files
+
+- `shared.bazelrc`: Common Bazel configurations (bzlmod, caching, error reporting)
+- `ci.bazelrc`: CI-specific settings (no color, detailed test output)
+- `.bazelversion`: Specifies required Bazel version
+- `go.mod`/`go.sum`: Go module dependencies for Go-based tools
+
+## Development Notes
+
+### File Organization
+
+- `/doc/`: Generated API documentation for all projects
+- `/examples/`: Example workspaces demonstrating usage
+- `/tests/`: Integration and unit tests
+- `/tools/`: Shared tooling (git, gh, tar, format)
+- `/ci/`: CI workflow generation utilities
+
+### Release Process
+
+Releases are automated through GitHub Actions using the `bzlrelease` system, which:
+
+- Generates release archives
+- Updates README with workspace snippets
+- Creates GitHub releases with proper versioning
+
+### Shell Script Standards
+
+All shell scripts follow these conventions:
+
+- Shebang: `#!/usr/bin/env bash`
+- Error handling: `set -o errexit -o nounset -o pipefail`
+- 2-space indentation
+- Use `shfmt -i 2 -ci -bn` for formatting
diff --git a/MODULE.bazel b/MODULE.bazel
index cd12ae46..02dd641b 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -4,33 +4,49 @@ module(
bazel_compatibility = [">=6.1.0"],
)
+local_git_ext = use_extension("//tools/git:extensions.bzl", "local_git_ext")
+use_repo(local_git_ext, "bazel_starlib_git_toolchains")
+
+register_toolchains(
+ "@bazel_starlib_git_toolchains//:local_git_toolchain",
+)
+
# MARK: - Runtime Dependencies
bazel_dep(
name = "rules_go",
- version = "0.50.1",
+ version = "0.55.1",
repo_name = "io_bazel_rules_go",
)
bazel_dep(
name = "gazelle",
- version = "0.40.0",
+ version = "0.44.0",
repo_name = "bazel_gazelle",
)
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(
name = "stardoc",
- version = "0.7.2",
+ version = "0.8.0",
repo_name = "io_bazel_stardoc",
)
bazel_dep(
name = "buildifier_prebuilt",
version = "7.3.1",
)
-bazel_dep(name = "platforms", version = "0.0.10")
-bazel_dep(name = "rules_shell", version = "0.3.0")
+bazel_dep(name = "platforms", version = "0.0.11")
+bazel_dep(name = "rules_shell", version = "0.5.0")
+bazel_dep(name = "rules_multitool", version = "1.0.0")
+bazel_dep(name = "aspect_bazel_lib", version = "2.19.4")
+
+multitool = use_extension(
+ "@rules_multitool//multitool:extension.bzl",
+ "multitool",
+)
+multitool.hub(lockfile = "//tools/gh:multitool.lock.json")
+use_repo(multitool, "multitool")
go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
-go_sdk.download(version = "1.23.3")
+go_sdk.download(version = "1.23.5")
go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
@@ -51,9 +67,10 @@ bazel_dep(
)
bazel_dep(
name = "rules_bazel_integration_test",
- version = "0.31.0",
+ version = "0.32.0",
dev_dependency = True,
)
+bazel_dep(name = "aspect_rules_lint", version = "1.5.1", dev_dependency = True)
bazel_binaries = use_extension(
"@rules_bazel_integration_test//:extensions.bzl",
@@ -61,11 +78,14 @@ bazel_binaries = use_extension(
dev_dependency = True,
)
bazel_binaries.download(version_file = "//:.bazelversion")
-bazel_binaries.download(version = "last_green")
+
+# GH525: Enable once archive extraction regression is fixed.
+# bazel_binaries.download(version = "last_green")
use_repo(
bazel_binaries,
"bazel_binaries",
"bazel_binaries_bazelisk",
"build_bazel_bazel_.bazelversion",
- "build_bazel_bazel_last_green",
+ # GH525: Enable once archive extraction regression is fixed.
+ # "build_bazel_bazel_last_green",
)
diff --git a/README.md b/README.md
index 3874c982..4362ea6b 100644
--- a/README.md
+++ b/README.md
@@ -35,7 +35,7 @@ how-to links above and review the [the generated documentation](/doc/).
```python
-bazel_dep(name = "cgrindel_bazel_starlib", version = "0.22.0")
+bazel_dep(name = "cgrindel_bazel_starlib", version = "0.27.0")
```
@@ -47,9 +47,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "cgrindel_bazel_starlib",
- sha256 = "4511eb49dfec9a8e796de79a7af051e062ef07795d4f8939a42553742d7520fe",
+ sha256 = "53e77f9b0cea589b4ca6dfb169ce5839aa61d6d56f0773d9bbd63b5fa8c1fff7",
urls = [
- "https://github.com/cgrindel/bazel-starlib/releases/download/v0.22.0/bazel-starlib.v0.22.0.tar.gz",
+ "https://github.com/cgrindel/bazel-starlib/releases/download/v0.27.0/bazel-starlib.v0.27.0.tar.gz",
],
)
diff --git a/bzlformat/tools/buildifier.sh b/bzlformat/tools/buildifier.sh
index 2cc460da..80970a6c 100755
--- a/bzlformat/tools/buildifier.sh
+++ b/bzlformat/tools/buildifier.sh
@@ -2,31 +2,38 @@
# --- begin runfiles.bash initialization v3 ---
# Copy-pasted from the Bazel Bash runfiles library v3.
-set -uo pipefail; set +e; f=bazel_tools/tools/bash/runfiles/runfiles.bash
-source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \
- source "$(grep -sm1 "^$f " "${RUNFILES_MANIFEST_FILE:-/dev/null}" | cut -f2- -d' ')" 2>/dev/null || \
- source "$0.runfiles/$f" 2>/dev/null || \
- source "$(grep -sm1 "^$f " "$0.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \
- source "$(grep -sm1 "^$f " "$0.exe.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \
- { echo>&2 "ERROR: ${BASH_SOURCE[0]} cannot find $f"; exit 1; }; f=; set -e
+set -uo pipefail
+set +e
+f=bazel_tools/tools/bash/runfiles/runfiles.bash
+source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null ||
+ source "$(grep -sm1 "^$f " "${RUNFILES_MANIFEST_FILE:-/dev/null}" | cut -f2- -d' ')" 2>/dev/null ||
+ source "$0.runfiles/$f" 2>/dev/null ||
+ source "$(grep -sm1 "^$f " "$0.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null ||
+ source "$(grep -sm1 "^$f " "$0.exe.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null ||
+ {
+ echo >&2 "ERROR: ${BASH_SOURCE[0]} cannot find $f"
+ exit 1
+ }
+f=
+set -e
# --- end runfiles.bash initialization v3 ---
# MARK - Locate Deps
fail_sh_location=cgrindel_bazel_starlib/shlib/lib/fail.sh
-fail_sh="$(rlocation "${fail_sh_location}")" || \
+fail_sh="$(rlocation "${fail_sh_location}")" ||
(echo >&2 "Failed to locate ${fail_sh_location}" && exit 1)
# shellcheck source=SCRIPTDIR/../../shlib/lib/fail.sh
source "${fail_sh}"
arrays_sh_location=cgrindel_bazel_starlib/shlib/lib/arrays.sh
-arrays_sh="$(rlocation "${arrays_sh_location}")" || \
+arrays_sh="$(rlocation "${arrays_sh_location}")" ||
(echo >&2 "Failed to locate ${arrays_sh_location}" && exit 1)
# shellcheck source=SCRIPTDIR/../../shlib/lib/arrays.sh
source "${arrays_sh}"
buildifier_location=buildifier_prebuilt/buildifier/buildifier
-buildifier="$(rlocation "${buildifier_location}")" || \
+buildifier="$(rlocation "${buildifier_location}")" ||
(echo >&2 "Failed to locate ${buildifier_location}" && exit 1)
# MARK - Process Args
@@ -35,7 +42,7 @@ buildifier="$(rlocation "${buildifier_location}")" || \
# off - Do not lint
# warn - Report lint issues.
# fix = Attempt to fix lint issues.
-lint_modes=( off warn fix )
+lint_modes=(off warn fix)
lint_mode="off"
warnings="all"
@@ -50,7 +57,7 @@ Usage:
${utility} [OPTION]...