mirror of
https://github.com/bazel-contrib/bazel-lib
synced 2024-12-03 11:52:43 +00:00
chore: turn on more basic precommit checks
In particular this makes our bazelrc presets more compliant with client codebases, ensuring they can copy these files and not trip on their own pre-commit check
This commit is contained in:
parent
fde705ba8c
commit
1df2becc7a
|
@ -24,3 +24,15 @@ repos:
|
|||
rev: "v2.4.0"
|
||||
hooks:
|
||||
- id: prettier
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.4.0
|
||||
hooks:
|
||||
- id: check-added-large-files
|
||||
- id: check-byte-order-marker
|
||||
- id: check-case-conflict
|
||||
- id: check-symlinks
|
||||
- id: destroyed-symlinks
|
||||
- id: end-of-file-fixer
|
||||
exclude: &exclude_pattern "^(docs|e2e|lib/tests)/"
|
||||
- id: mixed-line-ending
|
||||
- id: trailing-whitespace
|
||||
|
|
1
LICENSE
1
LICENSE
|
@ -175,4 +175,3 @@
|
|||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ Users should *not* need to install these. If users see a load()
|
|||
statement from these, that's a bug in our distribution.
|
||||
"""
|
||||
|
||||
load("//lib:repositories.bzl", "register_jq_toolchains", "register_yq_toolchains", "register_coreutils_toolchains")
|
||||
load("//lib:repositories.bzl", "register_coreutils_toolchains", "register_jq_toolchains", "register_yq_toolchains")
|
||||
load("//lib:utils.bzl", http_archive = "maybe_http_archive")
|
||||
|
||||
# buildifier: disable=unnamed-macro
|
||||
|
|
|
@ -44,21 +44,21 @@ COREUTILS_VERSIONS = {
|
|||
"0.0.16": {
|
||||
"linux_arm64": {
|
||||
"filename": "coreutils-0.0.16-aarch64-unknown-linux-gnu.tar.gz",
|
||||
"sha256": "sha256-6tExkcMMHe7+59M9Mp9UKeq+g0y+juO7oakZfVOtOqw="
|
||||
"sha256": "sha256-6tExkcMMHe7+59M9Mp9UKeq+g0y+juO7oakZfVOtOqw=",
|
||||
},
|
||||
"darwin_amd64": {
|
||||
"filename": "coreutils-0.0.16-x86_64-apple-darwin.tar.gz",
|
||||
"sha256": "sha256-lQYWAuPOKS6XxwArZdiKIyczwppTVwjF4ml0iKBaB9s="
|
||||
"sha256": "sha256-lQYWAuPOKS6XxwArZdiKIyczwppTVwjF4ml0iKBaB9s=",
|
||||
},
|
||||
"windows_amd64": {
|
||||
"filename": "coreutils-0.0.16-x86_64-pc-windows-msvc.zip",
|
||||
"sha256": "sha256-z5E1onYAKZoaUt2U1cv1t8UHPsJinYktEd6SpE2u07o="
|
||||
"sha256": "sha256-z5E1onYAKZoaUt2U1cv1t8UHPsJinYktEd6SpE2u07o=",
|
||||
},
|
||||
"linux_amd64": {
|
||||
"filename": "coreutils-0.0.16-x86_64-unknown-linux-gnu.tar.gz",
|
||||
"sha256": "sha256-Slf4qKf19sAWoK2pUVluAitmL3N2uz4eWpV4eibIEW0="
|
||||
}
|
||||
}
|
||||
"sha256": "sha256-Slf4qKf19sAWoK2pUVluAitmL3N2uz4eWpV4eibIEW0=",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
CoreUtilsInfo = provider(
|
||||
|
@ -99,7 +99,7 @@ coreutils_toolchain = rule(
|
|||
attrs = {
|
||||
"binary": attr.label(
|
||||
mandatory = True,
|
||||
allow_single_file = True
|
||||
allow_single_file = True,
|
||||
),
|
||||
},
|
||||
)
|
||||
|
@ -176,7 +176,7 @@ def _coreutils_platform_repo_impl(rctx):
|
|||
filename = COREUTILS_VERSIONS[rctx.attr.version][platform]["filename"]
|
||||
url = "https://github.com/uutils/coreutils/releases/download/{}/{}".format(
|
||||
rctx.attr.version,
|
||||
filename
|
||||
filename,
|
||||
)
|
||||
rctx.download_and_extract(
|
||||
url = url,
|
||||
|
|
|
@ -57,4 +57,3 @@ else
|
|||
fail "files \"{file1}\" and \"{file2}\" differ. {fail_msg}"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -166,7 +166,6 @@ def _mixed_wrapping_globstar(ctx):
|
|||
|
||||
mixed_wrapper_globstar_test = unittest.make(_mixed_wrapping_globstar)
|
||||
|
||||
|
||||
def _is_glob(ctx):
|
||||
env = unittest.begin(ctx)
|
||||
|
||||
|
@ -218,5 +217,5 @@ def glob_match_test_suite():
|
|||
|
||||
unittest.suite(
|
||||
"is_glob",
|
||||
partial.make(is_glob_test, timeout = "short")
|
||||
partial.make(is_glob_test, timeout = "short"),
|
||||
)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
{
|
||||
"extends": [
|
||||
"config:base"
|
||||
]
|
||||
"extends": ["config:base"]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue