File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77bazel_dep (name = "bazel_skylib" , version = "1.8.2" )
88bazel_dep (name = "platforms" , version = "1.0.0" )
9- bazel_dep (name = "rules_shell" , version = "0.6 .1" )
9+ bazel_dep (name = "rules_shell" , version = "0.7 .1" )
1010
1111shellcheck = use_extension ("//shellcheck/internal:extensions.bzl" , "shellcheck" )
1212use_repo (
Original file line number Diff line number Diff line change 22"""
33
44load ("@bazel_skylib//rules:common_settings.bzl" , "BuildSettingInfo" )
5+ load ("@rules_shell//shell:sh_binary_info.bzl" , "ShBinaryInfo" )
6+ load ("@rules_shell//shell:sh_info.bzl" , "ShInfo" )
57load (":toolchain.bzl" , "TOOLCHAIN_TYPE" )
68
79_SHELL_CONTENT = """\
@@ -112,12 +114,6 @@ ShellcheckSrcsInfo = provider(
112114)
113115
114116def _shellcheck_srcs_aspect_impl (_target , ctx ):
115- # TODO: Replace when a `rules_shell` provider is available
116- # https://github.com/bazelbuild/rules_shell/issues/16
117- rule_name = ctx .rule .kind
118- if rule_name not in ["sh_binary" , "sh_test" , "sh_library" ]:
119- return []
120-
121117 srcs = getattr (ctx .rule .files , "srcs" , [])
122118 source_paths = [src .dirname for src in srcs ]
123119
@@ -243,4 +239,5 @@ shellcheck_aspect = aspect(
243239 },
244240 toolchains = [TOOLCHAIN_TYPE ],
245241 requires = [_shellcheck_srcs_aspect ],
242+ required_providers = [[ShInfo ], [ShBinaryInfo ]],
246243)
You can’t perform that action at this time.
0 commit comments