https://github.com/aignas/rules_shellcheck
Run shellcheck as part of your bazel tests.
https://github.com/aignas/rules_shellcheck
bazel bazel-rules shellcheck
Last synced: about 1 year ago
JSON representation
Run shellcheck as part of your bazel tests.
- Host: GitHub
- URL: https://github.com/aignas/rules_shellcheck
- Owner: aignas
- License: mit
- Created: 2020-10-11T09:58:21.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-03-11T08:15:32.000Z (about 2 years ago)
- Last Synced: 2025-01-19T06:44:27.785Z (about 1 year ago)
- Topics: bazel, bazel-rules, shellcheck
- Language: Starlark
- Homepage:
- Size: 67.4 KB
- Stars: 22
- Watchers: 4
- Forks: 9
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Shellcheck rules for bazel
Now you do not need to depend on the system `shellcheck` version in your bazel-managed (mono)repos.
[](https://github.com/aignas/rules_shellcheck/actions)
Choose your release from the [GH Releases](https://github.com/aignas/rules_shellcheck/releases) and follow setup instructions there.
Then `shellcheck` can be accessed by running:
```shell
bazel run @rules_shellcheck//:shellcheck --
```
And you can define a lint target:
```starlark
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].
[rules_lint]: https://github.com/aspect-build/rules_lint