Skip to content

No shell script in the root workspace is linted: the shellcheck aspect has no sh_* target to visit #853

Closed

Description

@bpalermo

Found while wiring #848.

.bazelrc has run the shellcheck aspect on every --config=lint build since it was added:

build:lint --aspects=...,//bazel/lint:linters.bzl%shellcheck,...

and lint_shellcheck_aspect visits sh_binary / sh_library / sh_test only (rule_kinds in @aspect_rules_lint//lint:shellcheck.bzl). Before #848 the root workspace declared none of those — bazel query 'kind("sh_(binary|library|test)", //...)' returned nothing.

So the aspect has always been a no-op here, and make lint has never shellcheck'd a line of the repository's own shell: scripts/*.sh, e2e/**/*.sh, bazel/*.sh. #848 fixed this only for the //proxy workspace's scripts (//bazel/lint/proxy_shell), which was its scope.

make format is unaffected — shfmt discovers files through git ls-files, not the build graph, so formatting has always covered them. It is the linting that was vacuous.

What it would take

//scripts:check_proxy_shell_lint is the one-file precedent added by #848; widening its srcs to glob(["*.sh"]) and adding the same target under e2e/ and bazel/ is the mechanical part. The reason it was not done in #848 is that three scripts currently have findings, and fixing them is a change to test harnesses rather than to build config:

e2e/multicluster_config.sh:133      SC2155  local etcd="http://$(etcd_ip):2379"   masks the return value
e2e/multicluster_replicator.sh:41   SC2034  TUNNEL_PORT appears unused
e2e/multicluster_waypoint.sh:257    SC2155  same shape as the first

shellcheck 0.11.0 (@aspect_rules_lint//lint:shellcheck_bin), --rcfile .shellcheckrc. Everything else under scripts/, e2e/ and bazel/ is already clean, so this is three edits away from being enforceable.

Activity

  1. self-assigned this
    on Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions