Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • bazel/pre-commit
1 result
Show changes
Commits on Source (6)
## [1.0.2](https://git.gitlab.arm.com/bazel/pre-commit/compare/v1.0.1...v1.0.2) (2025-03-05)
### Bug Fixes
- make Windows non-support explicit ([aeea146](https://git.gitlab.arm.com/bazel/pre-commit/commit/aeea1465a063d1e895856d02152ff9f2e9499be5)), closes [#1](https://git.gitlab.arm.com/bazel/pre-commit/issues/1)
## [1.0.1](https://git.gitlab.arm.com/bazel/pre-commit/compare/v1.0.0...v1.0.1) (2025-03-05)
### Bug Fixes
......
......@@ -4,13 +4,21 @@
[Install][bazelisk-install] `bazelisk` and run the tests:
```sh
```console
$ bazelisk test //...
$ (cd e2e; bazelisk test //...)
```
[bazelisk-install]: https://github.com/bazelbuild/bazelisk?tab=readme-ov-file#installation
# Hooks
Install the `git` hooks with:
```console
$ bazelisk run hooks:install
```
# Workflow
- Follow the [contributions guide] to be granted forking permissions.
......
module(
name = "pre-commit",
version = "1.0.1",
version = "1.0.2",
compatibility_level = 1,
)
bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_python", version = "1.0.0")
bazel_dep(name = "rules_license", version = "1.0.0")
......
......@@ -55,7 +55,8 @@
"https://bcr.bazel.build/modules/jsoncpp/1.9.5/source.json": "4108ee5085dd2885a341c7fab149429db457b3169b86eb081fa245eadf69169d",
"https://bcr.bazel.build/modules/libpfm/4.11.0/MODULE.bazel": "45061ff025b301940f1e30d2c16bea596c25b176c8b6b3087e92615adbd52902",
"https://bcr.bazel.build/modules/platforms/0.0.10/MODULE.bazel": "8cb8efaf200bdeb2150d93e162c40f388529a25852b332cec879373771e48ed5",
"https://bcr.bazel.build/modules/platforms/0.0.10/source.json": "f22828ff4cf021a6b577f1bf6341cb9dcd7965092a439f64fc1bb3b7a5ae4bd5",
"https://bcr.bazel.build/modules/platforms/0.0.11/MODULE.bazel": "0daefc49732e227caa8bfa834d65dc52e8cc18a2faf80df25e8caea151a9413f",
"https://bcr.bazel.build/modules/platforms/0.0.11/source.json": "f7e188b79ebedebfe75e9e1d098b8845226c7992b307e28e1496f23112e8fc29",
"https://bcr.bazel.build/modules/platforms/0.0.4/MODULE.bazel": "9b328e31ee156f53f3c416a64f8491f7eb731742655a47c9eec4703a71644aee",
"https://bcr.bazel.build/modules/platforms/0.0.5/MODULE.bazel": "5733b54ea419d5eaf7997054bb55f6a1d0b5ff8aedf0176fef9eea44f3acda37",
"https://bcr.bazel.build/modules/platforms/0.0.6/MODULE.bazel": "ad6eeef431dc52aefd2d77ed20a4b353f8ebf0f4ecdd26a807d2da5aa8cd0615",
......@@ -354,22 +355,6 @@
]
}
},
"@@platforms//host:extension.bzl%host_platform": {
"general": {
"bzlTransitiveDigest": "xelQcPZH8+tmuOHVjL9vDxMnnQNMlwj0SlvgoqBkm4U=",
"usagesDigest": "SeQiIN/f8/Qt9vYQk7qcXp4I4wJeEC0RnQDiaaJ4tb8=",
"recordedFileInputs": {},
"recordedDirentsInputs": {},
"envVariables": {},
"generatedRepoSpecs": {
"host_platform": {
"repoRuleId": "@@platforms//host:extension.bzl%host_platform_repo",
"attributes": {}
}
},
"recordedRepoMappingEntries": []
}
},
"@@rules_java+//java:rules_java_deps.bzl%compatibility_proxy": {
"general": {
"bzlTransitiveDigest": "84xJEZ1jnXXwo8BXMprvBm++rRt4jsTu9liBxz0ivps=",
......@@ -555,7 +540,7 @@
"@@rules_python+//python/extensions:pip.bzl%pip": {
"general": {
"bzlTransitiveDigest": "2ZGbLzEhJiYeTL/HLcIGGr/4T4YIvqiLTBDeEGjVdFE=",
"usagesDigest": "om6bHx19i4+w5Luc6l//BnYbBbXVJIPup9VRIO+TzlE=",
"usagesDigest": "Per/JHQwdtCnlHfCv49mWhurW9CoU+w3Vx/FsHBd4z4=",
"recordedFileInputs": {
"@@//pre-commit/config/requirements/lock.txt": "c4df528d05090e2268c3f64b30c016de5175939606c1ebc14088f888f5d93dd0",
"@@//pre-commit/hook/requirements/lock.txt": "5f20fd61af75464158a62d2d3739cefca20d6963130c6cb37e345bcfef567424",
......
......@@ -78,7 +78,7 @@ See [//pre-commit/hook/check-newline-at-end-of-file](pre-commit/hook/check-newli
Multiple hooks can be bundled together with `pre_commit_hooks`.
Setting the visibility of that target to `//visibility:public` will allow downstream users to include the target in `pre_commit_config#deps`.
Setting the visibility of that target to `//visibility:public` will allow downstream users to include the target in `pre_commit_config#srcs`.
See [//pre-commit/hook/buildifier](pre-commit/hook/buildifier/BUILD.bazel) for an example of bundled hooks, albeit without public visibility.
......
......@@ -50,7 +50,8 @@
"https://bcr.bazel.build/modules/jsoncpp/1.9.5/source.json": "4108ee5085dd2885a341c7fab149429db457b3169b86eb081fa245eadf69169d",
"https://bcr.bazel.build/modules/libpfm/4.11.0/MODULE.bazel": "45061ff025b301940f1e30d2c16bea596c25b176c8b6b3087e92615adbd52902",
"https://bcr.bazel.build/modules/platforms/0.0.10/MODULE.bazel": "8cb8efaf200bdeb2150d93e162c40f388529a25852b332cec879373771e48ed5",
"https://bcr.bazel.build/modules/platforms/0.0.10/source.json": "f22828ff4cf021a6b577f1bf6341cb9dcd7965092a439f64fc1bb3b7a5ae4bd5",
"https://bcr.bazel.build/modules/platforms/0.0.11/MODULE.bazel": "0daefc49732e227caa8bfa834d65dc52e8cc18a2faf80df25e8caea151a9413f",
"https://bcr.bazel.build/modules/platforms/0.0.11/source.json": "f7e188b79ebedebfe75e9e1d098b8845226c7992b307e28e1496f23112e8fc29",
"https://bcr.bazel.build/modules/platforms/0.0.4/MODULE.bazel": "9b328e31ee156f53f3c416a64f8491f7eb731742655a47c9eec4703a71644aee",
"https://bcr.bazel.build/modules/platforms/0.0.5/MODULE.bazel": "5733b54ea419d5eaf7997054bb55f6a1d0b5ff8aedf0176fef9eea44f3acda37",
"https://bcr.bazel.build/modules/platforms/0.0.6/MODULE.bazel": "ad6eeef431dc52aefd2d77ed20a4b353f8ebf0f4ecdd26a807d2da5aa8cd0615",
......@@ -200,22 +201,6 @@
]
}
},
"@@platforms//host:extension.bzl%host_platform": {
"general": {
"bzlTransitiveDigest": "xelQcPZH8+tmuOHVjL9vDxMnnQNMlwj0SlvgoqBkm4U=",
"usagesDigest": "SeQiIN/f8/Qt9vYQk7qcXp4I4wJeEC0RnQDiaaJ4tb8=",
"recordedFileInputs": {},
"recordedDirentsInputs": {},
"envVariables": {},
"generatedRepoSpecs": {
"host_platform": {
"repoRuleId": "@@platforms//host:extension.bzl%host_platform_repo",
"attributes": {}
}
},
"recordedRepoMappingEntries": []
}
},
"@@rules_java+//java:rules_java_deps.bzl%compatibility_proxy": {
"general": {
"bzlTransitiveDigest": "84xJEZ1jnXXwo8BXMprvBm++rRt4jsTu9liBxz0ivps=",
......@@ -305,7 +290,7 @@
"@@rules_python+//python/extensions:pip.bzl%pip": {
"general": {
"bzlTransitiveDigest": "5c6OlhUxy0VyL+VUCux9qubrei54dI8Ec5rUrxouxjY=",
"usagesDigest": "ojYY40tcMHsUX2wqlEocJ602cLLQzjOy1e5p1/75x2I=",
"usagesDigest": "1aVDimH0uKTqIaIJQfpB9VTXYR4XtuduYc5tuZvoeoI=",
"recordedFileInputs": {
"@@pre-commit+//pre-commit/config/requirements/lock.txt": "c4df528d05090e2268c3f64b30c016de5175939606c1ebc14088f888f5d93dd0",
"@@pre-commit+//pre-commit/hook/requirements/lock.txt": "5f20fd61af75464158a62d2d3739cefca20d6963130c6cb37e345bcfef567424",
......
......@@ -20,6 +20,10 @@ def pre_commit(
srcs = [native.package_relative_label(s) for s in srcs],
out = out,
visibility = visibility,
target_compatible_with = select({
"@platforms//os:windows": ["@platforms//:incompatible"],
"//conditions:default": [],
}),
)
pre_commit_install(
......