diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8c26a3fa5..200c92a7d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -148,10 +148,15 @@ jobs: - name: Verify bcr patches if: matrix.folder == '.' && matrix.bzlmod == '1' && matrix.os == 'ubuntu' && matrix.bazel-version.major != '6' run: patch --dry-run -p1 < .bcr/patches/*.patch + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pre-commit/action@v3.0.1 # For branch protection settings, this job provides a "stable" name that can be used to gate PR merges # on "all matrix jobs were successful". conclusion: - needs: test + needs: [test, pre-commit] runs-on: ubuntu-latest if: always() steps: diff --git a/.shellcheckrc b/.shellcheckrc index aade3f932..2b520be00 100644 --- a/.shellcheckrc +++ b/.shellcheckrc @@ -3,4 +3,4 @@ enable=quote-safe-variables # Turn on warnings for unassigned uppercase variables enable=check-unassigned-uppercase -#enable=require-variable-braces \ No newline at end of file +#enable=require-variable-braces diff --git a/.typos.toml b/.typos.toml index b14a95245..b13744aeb 100644 --- a/.typos.toml +++ b/.typos.toml @@ -1,2 +1,3 @@ [default.extend-identifiers] MODULEs = "MODULEs" # Else it becomes MODULEEs +HashiCorp = "HashiCorp" diff --git a/e2e/smoke/BUILD.bazel b/e2e/smoke/BUILD.bazel index a2d83caf1..3339485aa 100644 --- a/e2e/smoke/BUILD.bazel +++ b/e2e/smoke/BUILD.bazel @@ -121,9 +121,6 @@ go_test( name = "test_preserve_mtime", size = "small", srcs = ["test_preserve_mtime.go"], - deps = [ - "@io_bazel_rules_go//go/tools/bazel:go_default_library", - ], data = [ "d", ":copy_directory_mtime_case", @@ -135,5 +132,12 @@ go_test( # bazel test :test_preserve_mtime # This test should pass # touch d/1 # Update the mtime, in the CI environment this is done with the SCM integration. # bazel test :test_preserve_mtime # This test now fails - tags = ["no-remote", "external", "manual"], + tags = [ + "external", + "manual", + "no-remote", + ], + deps = [ + "@io_bazel_rules_go//go/tools/bazel:go_default_library", + ], ) diff --git a/e2e/smoke/MODULE.bazel b/e2e/smoke/MODULE.bazel index 9149c6bf6..88cfbc721 100644 --- a/e2e/smoke/MODULE.bazel +++ b/e2e/smoke/MODULE.bazel @@ -5,4 +5,4 @@ local_path_override( ) bazel_dep(name = "bazel_skylib", version = "1.7.1", dev_dependency = True) -bazel_dep(name = "rules_go", version = "0.50.1", repo_name = "io_bazel_rules_go", dev_dependency = True) +bazel_dep(name = "rules_go", version = "0.50.1", dev_dependency = True, repo_name = "io_bazel_rules_go") diff --git a/e2e/smoke/test_preserve_mtime.go b/e2e/smoke/test_preserve_mtime.go index 7c1bb1b7e..cf334aff6 100644 --- a/e2e/smoke/test_preserve_mtime.go +++ b/e2e/smoke/test_preserve_mtime.go @@ -26,7 +26,7 @@ func mtime(path string) (time.Time, error) { func (r runfilePath) osPath() (string, error) { dirPath, err := bazel.Runfile(r.runfileDir) - if err != nil{ + if err != nil { return "", err } parts := append([]string{dirPath}, r.subPaths...) @@ -34,28 +34,28 @@ func (r runfilePath) osPath() (string, error) { } func TestPreserveMTime(t *testing.T) { - cases := map[string]struct{ + cases := map[string]struct { original runfilePath - copied runfilePath + copied runfilePath }{ "copy_directory": { original: runfilePath{ runfileDir: "d", - subPaths: []string{"1"}, + subPaths: []string{"1"}, }, copied: runfilePath{ runfileDir: "copy_directory_mtime_out", - subPaths: []string{"1"}, + subPaths: []string{"1"}, }, }, "copy_to_directory": { original: runfilePath{ runfileDir: "d", - subPaths: []string{"1"}, + subPaths: []string{"1"}, }, copied: runfilePath{ runfileDir: "copy_to_directory_mtime_out", - subPaths: []string{"d", "1"}, + subPaths: []string{"d", "1"}, }, }, } diff --git a/lib/private/tar.bzl b/lib/private/tar.bzl index 9e201c949..21958fe2d 100644 --- a/lib/private/tar.bzl +++ b/lib/private/tar.bzl @@ -175,7 +175,7 @@ def _is_unused_inputs_enabled(attr): return False if attr.compute_unused_inputs == -1: return attr._compute_unused_inputs_flag[BuildSettingInfo].value - + fail("Unexpected `compute_unused_inputs` value: {}".format(attr.compute_unused_inputs)) def _is_unprunable(file): diff --git a/lib/tests/expand_template/index.html b/lib/tests/expand_template/index.html index 328c71080..ec2cc0dc0 100644 --- a/lib/tests/expand_template/index.html +++ b/lib/tests/expand_template/index.html @@ -1,4 +1,4 @@ - +
diff --git a/lib/tests/transitions/BUILD.bazel b/lib/tests/transitions/BUILD.bazel index 48abfc89c..a7876edd1 100644 --- a/lib/tests/transitions/BUILD.bazel +++ b/lib/tests/transitions/BUILD.bazel @@ -137,7 +137,10 @@ platform_transition_test( name = "transitioned_go_test_x86_64", binary = ":test_transition_test", # only run this test on an x86_64 host - target_compatible_with = [] if sorted(HOST_CONSTRAINTS) == ["@platforms//cpu:x86_64", "@platforms//os:linux"] else ["@platforms//:incompatible"], + target_compatible_with = [] if sorted(HOST_CONSTRAINTS) == [ + "@platforms//cpu:x86_64", + "@platforms//os:linux", + ] else ["@platforms//:incompatible"], target_platform = "x86_64_linux", ) @@ -145,7 +148,10 @@ platform_transition_test( name = "transitioned_go_test_arm64", binary = ":test_transition_test", # only run this test on an x86_64 host - target_compatible_with = [] if sorted(HOST_CONSTRAINTS) == ["@platforms//cpu:aarch64", "@platforms//os:linux"] else ["@platforms//:incompatible"], + target_compatible_with = [] if sorted(HOST_CONSTRAINTS) == [ + "@platforms//cpu:aarch64", + "@platforms//os:linux", + ] else ["@platforms//:incompatible"], target_platform = "arm64_linux", ) diff --git a/tools/lint/vale/config/vocabularies/engineering/accept.txt b/tools/lint/vale/config/vocabularies/engineering/accept.txt index 39935fc48..c65201944 100644 --- a/tools/lint/vale/config/vocabularies/engineering/accept.txt +++ b/tools/lint/vale/config/vocabularies/engineering/accept.txt @@ -62,7 +62,7 @@ rebase mutex hotfix oncall -poisioning +poisoning statefulness teardown toolchain diff --git a/tools/lint/vale/config/vocabularies/engineering/reject.txt b/tools/lint/vale/config/vocabularies/engineering/reject.txt index ba0e162e1..5716ca598 100644 --- a/tools/lint/vale/config/vocabularies/engineering/reject.txt +++ b/tools/lint/vale/config/vocabularies/engineering/reject.txt @@ -1 +1 @@ -bar \ No newline at end of file +bar