Skip to content

Commit 5ec3971

Browse files
jklukasalexeagle
andauthored
Add linting for unsorted-dict-items (#89)
Co-authored-by: Alex Eagle <[email protected]>
1 parent 1a9deab commit 5ec3971

File tree

4 files changed

+427
-448
lines changed

4 files changed

+427
-448
lines changed

.github/workflows/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ load("@buildifier_prebuilt//:rules.bzl", "buildifier")
22

33
buildifier(
44
name = "buildifier.check",
5+
args = ["--warnings=unsorted-dict-items"],
56
exclude_patterns = ["./.git/*"],
67
lint_mode = "warn",
78
mode = "diff",

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ repos:
1818
hooks:
1919
- id: buildifier
2020
- id: buildifier-lint
21+
args: ["-warnings=unsorted-dict-items"]
2122
# Enforce that commit messages allow for later changelog generation
2223
- repo: https://github.com/commitizen-tools/commitizen
2324
rev: v2.18.0

protoc/extensions.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def _proto_extension_impl(module_ctx):
3434
protoc = module_extension(
3535
implementation = _proto_extension_impl,
3636
tag_classes = {
37+
# buildifier: disable=unsorted-dict-items
3738
"toolchain": tag_class(attrs = {
3839
"name": attr.string(doc = """\
3940
Base name for generated repositories, allowing more than one toolchain to be registered.

0 commit comments

Comments
 (0)