diff --git a/docs/BUILD.bazel b/docs/BUILD.bazel index 464d40611..a9937108b 100644 --- a/docs/BUILD.bazel +++ b/docs/BUILD.bazel @@ -4,6 +4,7 @@ This is in a separate package from both the stardoc source files and the resulting documentation markdown files, to prevent users trying to load() the stardoc repository, which is not a dependency users should install. """ + load("@bazel_skylib//rules:write_file.bzl", "write_file") load("@bazel_skylib//rules:diff_test.bzl", "diff_test") load("@io_bazel_stardoc//stardoc:stardoc.bzl", "stardoc") @@ -22,7 +23,10 @@ _DOC_SRCS = { input = input + ".bzl", deps = [input], ) - for [input, out] in _DOC_SRCS.items() + for [ + input, + out, + ] in _DOC_SRCS.items() ] [ diff --git a/internal/gazelle_binary.bzl b/internal/gazelle_binary.bzl index 94797e0cd..fa1187c7a 100644 --- a/internal/gazelle_binary.bzl +++ b/internal/gazelle_binary.bzl @@ -126,4 +126,4 @@ def format_import(importpath): return '{} "{}"'.format(_import_alias(importpath), importpath) def format_call(importpath): - return _import_alias(importpath)+".NewLanguage()" + return _import_alias(importpath) + ".NewLanguage()" diff --git a/internal/go_repository.bzl b/internal/go_repository.bzl index e54cea098..0c663eea5 100644 --- a/internal/go_repository.bzl +++ b/internal/go_repository.bzl @@ -103,7 +103,6 @@ Authorization: Bearer RANDOM-TOKEN """ - # We can't disable timeouts on Bazel, but we can set them to large values. _GO_REPOSITORY_TIMEOUT = 86400 @@ -396,7 +395,7 @@ go_repository = repository_rule( `replace` will be downloaded at `version` and verified with `sum`. NOTE: There is no `go_repository` equivalent to file path `replace` - directives. Use `local_repository` instead.""" + directives. Use `local_repository` instead.""", ), # Attributes for a repository that needs automatic build file generation @@ -520,7 +519,7 @@ go_repository = repository_rule( so this defaults to `False`. However, setting to `True` can be useful for debugging build failures and unexpected behavior for the given rule. """, - ) + ), }, ) """See repository.md#go-repository for full documentation.""" diff --git a/internal/overlay_repository.bzl b/internal/overlay_repository.bzl index bc0e1f750..7f388d03f 100644 --- a/internal/overlay_repository.bzl +++ b/internal/overlay_repository.bzl @@ -72,7 +72,6 @@ http_archive( The file format of the repository archive. This is normally inferred from the downloaded file name.""", - ), "overlay": attr.label_keyed_string_dict( allow_files = True, @@ -84,7 +83,7 @@ http_archive( where the overlay files should be written. It's convenient to store the overlay dictionaries for all repositories in - a separate .bzl file. See Gazelle's `manifest.bzl`_ for an example.""" + a separate .bzl file. See Gazelle's `manifest.bzl`_ for an example.""", ), }, ) diff --git a/internal/repository_docs.bzl b/internal/repository_docs.bzl index 4d4a18236..a084d8b63 100644 --- a/internal/repository_docs.bzl +++ b/internal/repository_docs.bzl @@ -54,9 +54,10 @@ $ gazelle update-repos github.com/pkg/errors """ load("go_repository.bzl", _go_repository = "go_repository") -load("overlay_repository.bzl", - _http_archive = "http_archive", +load( + "overlay_repository.bzl", _git_repository = "git_repository", + _http_archive = "http_archive", ) go_repository = _go_repository diff --git a/tests/BUILD.bazel b/tests/BUILD.bazel index f9e86765d..d41c78ab2 100644 --- a/tests/BUILD.bazel +++ b/tests/BUILD.bazel @@ -9,18 +9,18 @@ load("//:def.bzl", "gazelle_generation_test") # This test Gazelle binary only has the "test_filegroup" plugin installed. gazelle_binary( name = "gazelle", - visibility = ["//visibility:private"], languages = [ "//internal/language/test_filegroup", ], + visibility = ["//visibility:private"], ) gazelle_binary( name = "gazelle_with_language_loads_from_flag", - visibility = ["//visibility:private"], languages = [ "//internal/language/test_loads_from_flag", ], + visibility = ["//visibility:private"], ) [gazelle_generation_test( @@ -31,7 +31,7 @@ gazelle_binary( # gazelle_generation_test accepts setting common test attributes. local = False, test_data = glob( - include = [file[0:-len("/WORKSPACE")] + "/**"], + include = [file[0:-len("/WORKSPACE")] + "/**"], ), ) for file in glob( include = ["**/WORKSPACE"], diff --git a/tests/bcr/MODULE.bazel b/tests/bcr/MODULE.bazel index f02570a57..3f54a5cba 100644 --- a/tests/bcr/MODULE.bazel +++ b/tests/bcr/MODULE.bazel @@ -24,6 +24,7 @@ go_deps.module( sum = "h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=", version = "v1.8.0", ) + # Transitive dependencies have to be listed here explicitly. go_deps.module( path = "gopkg.in/yaml.v3", @@ -37,8 +38,8 @@ go_deps.module( ) use_repo( go_deps, - "com_github_pelletier_go_toml", - "com_github_stretchr_testify", - # It is not necessary to list transitive dependencies here, only direct ones. - # "in_gopkg_yaml_v3", + "com_github_pelletier_go_toml", + "com_github_stretchr_testify", + # It is not necessary to list transitive dependencies here, only direct ones. + # "in_gopkg_yaml_v3", )