rules_shellcheck
0.2.4
published 1 year ago
20 stars
10 forks
3 watchers
MIT License
public
1 assets
227,553 downloads
11 KB
Compatibility level 1
L/GCay6OCjQ/eSZ8HO1fN7r64g3knUiX9WNmojE59Lg=
Maintained byIgnas Anikevicius
0.2.4
October 27, 2023
[expand for release notes]

Shellcheck rules for bazel

Now you do not need to depend on the system shellcheck version in your bazel-managed (mono)repos.

Build Status

Choose your release from the GH Releases and follow setup instructions there.

Then shellcheck can be accessed by running:

bazel run @rules_shellcheck//:shellcheck -- <parameters>

And you can define a lint target:

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

shellcheck_test(
    name = "shellcheck_test",
    data = glob(["*.sh"]),
    tags = ["lint"],
    format = "gcc",
    severity = "warning",
)

Note: this is a simple project that allows me to learn about various bazel concepts. Feel free to create PRs contributing to the project or consider using rules_lint.