bazelbuild / bazelbuild/rules_license
Provide a user extensible compliance linter
- Dominant language
- Starlark
- Stars
- 85
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
Typically, every BUILD file in a bazel module is under the license defined at `//:license`. Since Bazel does not have inheritance from enclosing packages, we must usually add:
```
package(default_package_metadata=["//:license", "//:package_info"])
```
to every BUILD file. We should provide tools to help user maintain that invariant.
Initial thoughts:
- Must be user extensible so organizations can add their own policies.
- Standalone tool:
- pro: can find all files, even if they are not in a package. That is a big win if you want to inject license scanning at this point.
- con: can't be a `bazel test`.
- Bazel rule
- pro: Can be a test, so it is trivial to add to CI.
- con: Misses files which are not mentioned from a BUILD file.
@jin
Contributor guide
Research direction
The issue names no files, tests, or entry points. Start by evaluating the standalone-tool and Bazel-rule options described in the issue, including their coverage and CI trade-offs. Done means a decided, user-extensible compliance-linting approach that helps maintain the BUILD-file metadata invariant.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100