@@ -5,6 +5,7 @@ load("@aspect_rules_lint//lint:checkstyle.bzl", "lint_checkstyle_aspect")
5
5
load ("@aspect_rules_lint//lint:clang_tidy.bzl" , "lint_clang_tidy_aspect" )
6
6
load ("@aspect_rules_lint//lint:eslint.bzl" , "lint_eslint_aspect" )
7
7
load ("@aspect_rules_lint//lint:flake8.bzl" , "lint_flake8_aspect" )
8
+ load ("@aspect_rules_lint//lint:keep_sorted.bzl" , "lint_keep_sorted_aspect" )
8
9
load ("@aspect_rules_lint//lint:ktlint.bzl" , "lint_ktlint_aspect" )
9
10
load ("@aspect_rules_lint//lint:lint_test.bzl" , "lint_test" )
10
11
load ("@aspect_rules_lint//lint:pmd.bzl" , "lint_pmd_aspect" )
@@ -15,76 +16,76 @@ load("@aspect_rules_lint//lint:stylelint.bzl", "lint_stylelint_aspect")
15
16
load ("@aspect_rules_lint//lint:vale.bzl" , "lint_vale_aspect" )
16
17
17
18
buf = lint_buf_aspect (
18
- config = "@@ //:buf.yaml" ,
19
+ config = Label ( "@ //:buf.yaml") ,
19
20
)
20
21
21
22
eslint = lint_eslint_aspect (
22
- binary = "@@ //tools/lint:eslint" ,
23
+ binary = Label ( "@ //tools/lint:eslint") ,
23
24
# ESLint will resolve the configuration file by looking in the working directory first.
24
25
# See https://eslint.org/docs/latest/use/configure/configuration-files#configuration-file-resolution
25
26
# We must also include any other config files we expect eslint to be able to locate, e.g. tsconfigs
26
27
configs = [
27
- "@@ //:eslintrc" ,
28
- "@@ //src:tsconfig" ,
28
+ Label ( "@ //:eslintrc") ,
29
+ Label ( "@ //src:tsconfig") ,
29
30
],
30
31
)
31
32
32
33
eslint_test = lint_test (aspect = eslint )
33
34
34
35
stylelint = lint_stylelint_aspect (
35
- binary = "@@ //tools/lint:stylelint" ,
36
- config = "@@ //:stylelintrc" ,
36
+ binary = Label ( "@ //tools/lint:stylelint") ,
37
+ config = Label ( "@ //:stylelintrc") ,
37
38
)
38
39
39
40
flake8 = lint_flake8_aspect (
40
- binary = "@@ //tools/lint:flake8" ,
41
- config = "@@ //:.flake8" ,
41
+ binary = Label ( "@ //tools/lint:flake8") ,
42
+ config = Label ( "@ //:.flake8") ,
42
43
)
43
44
44
45
flake8_test = lint_test (aspect = flake8 )
45
46
46
47
pmd = lint_pmd_aspect (
47
- binary = "@@ //tools/lint:pmd" ,
48
- rulesets = ["@@ //:pmd.xml" ],
48
+ binary = Label ( "@ //tools/lint:pmd") ,
49
+ rulesets = [Label ( "@ //:pmd.xml") ],
49
50
)
50
51
51
52
pmd_test = lint_test (aspect = pmd )
52
53
53
54
checkstyle = lint_checkstyle_aspect (
54
- binary = "@@ //tools/lint:checkstyle" ,
55
- config = "@@ //:checkstyle.xml" ,
56
- data = ["@@ //:checkstyle-suppressions.xml" ],
55
+ binary = Label ( "@ //tools/lint:checkstyle") ,
56
+ config = Label ( "@ //:checkstyle.xml") ,
57
+ data = [Label ( "@ //:checkstyle-suppressions.xml") ],
57
58
)
58
59
59
60
checkstyle_test = lint_test (aspect = checkstyle )
60
61
61
62
ruff = lint_ruff_aspect (
62
63
binary = "@multitool//tools/ruff" ,
63
64
configs = [
64
- "@@ //:.ruff.toml" ,
65
- "@@ //src/subdir:ruff.toml" ,
65
+ Label ( "@ //:.ruff.toml") ,
66
+ Label ( "@ //src/subdir:ruff.toml") ,
66
67
],
67
68
)
68
69
69
70
ruff_test = lint_test (aspect = ruff )
70
71
71
72
shellcheck = lint_shellcheck_aspect (
72
73
binary = "@multitool//tools/shellcheck" ,
73
- config = "@@ //:.shellcheckrc" ,
74
+ config = Label ( "@ //:.shellcheckrc") ,
74
75
)
75
76
76
77
shellcheck_test = lint_test (aspect = shellcheck )
77
78
78
79
vale = lint_vale_aspect (
79
- binary = "@@ //tools/lint:vale" ,
80
- config = "@@ //:.vale.ini" ,
81
- styles = "@@ //tools/lint:vale_styles" ,
80
+ binary = Label ( "@ //tools/lint:vale") ,
81
+ config = Label ( "@ //:.vale.ini") ,
82
+ styles = Label ( "@ //tools/lint:vale_styles") ,
82
83
)
83
84
84
85
ktlint = lint_ktlint_aspect (
85
- binary = "@@ com_github_pinterest_ktlint//file" ,
86
- editorconfig = "@@ //:.editorconfig" ,
87
- baseline_file = "@@ //:ktlint-baseline.xml" ,
86
+ binary = Label ( "@ com_github_pinterest_ktlint//file") ,
87
+ editorconfig = Label ( "@ //:.editorconfig") ,
88
+ baseline_file = Label ( "@ //:ktlint-baseline.xml") ,
88
89
)
89
90
90
91
ktlint_test = lint_test (aspect = ktlint )
@@ -113,8 +114,14 @@ clang_tidy_global_config = lint_clang_tidy_aspect(
113
114
)
114
115
115
116
spotbugs = lint_spotbugs_aspect (
116
- binary = "@@ //tools/lint:spotbugs" ,
117
- exclude_filter = "@@ //:spotbugs-exclude.xml" ,
117
+ binary = Label ( "@ //tools/lint:spotbugs") ,
118
+ exclude_filter = Label ( "@ //:spotbugs-exclude.xml") ,
118
119
)
119
120
120
121
spotbugs_test = lint_test (aspect = spotbugs )
122
+
123
+ keep_sorted = lint_keep_sorted_aspect (
124
+ binary = Label ("@com_github_google_keep_sorted//:keep-sorted" ),
125
+ )
126
+
127
+ keep_sorted_test = lint_test (aspect = keep_sorted )
0 commit comments