diff --git a/WARNINGS.md b/WARNINGS.md index 5ee0af111..460d89ec2 100644 --- a/WARNINGS.md +++ b/WARNINGS.md @@ -44,6 +44,9 @@ Warning categories supported by buildifier's linter: * [`native-package`](#native-package) * [`native-proto`](#native-proto) * [`native-py`](#native-py) + * [`native-sh-binary`](#native-sh-binary) + * [`native-sh-library`](#native-sh-library) + * [`native-sh-test`](#native-sh-test) * [`no-effect`](#no-effect) * [`out-of-order-load`](#out-of-order-load) * [`output-group`](#output-group) @@ -754,6 +757,36 @@ at the moment it's not required to load Starlark rules. -------------------------------------------------------------------------------- +## sh_binary build rules should be loaded from Starlark + + * Category name: `native-sh-binary` + * Automatic fix: yes + * [Suppress the warning](#suppress): `# buildifier: disable=native-sh-binary` + +The sh_binary build rules should be loaded from Starlark. + +-------------------------------------------------------------------------------- + +## sh_library build rules should be loaded from Starlark + + * Category name: `native-sh-library` + * Automatic fix: yes + * [Suppress the warning](#suppress): `# buildifier: disable=native-sh-library` + +The sh_library build rules should be loaded from Starlark. + +-------------------------------------------------------------------------------- + +## sh_test build rules should be loaded from Starlark + + * Category name: `native-sh-test` + * Automatic fix: yes + * [Suppress the warning](#suppress): `# buildifier: disable=native-sh-test` + +The sh_test build rules should be loaded from Starlark. + +-------------------------------------------------------------------------------- + ## Expression result is not used * Category name: `no-effect` diff --git a/buildifier/config/config_test.go b/buildifier/config/config_test.go index ff120d393..ea59e11dd 100644 --- a/buildifier/config/config_test.go +++ b/buildifier/config/config_test.go @@ -83,6 +83,9 @@ func ExampleExample() { // "native-package", // "native-proto", // "native-py", + // "native-sh-binary", + // "native-sh-library", + // "native-sh-test", // "no-effect", // "output-group", // "overly-nested-depset", @@ -264,6 +267,9 @@ func TestValidate(t *testing.T) { "native-package", "native-proto", "native-py", + "native-sh-binary", + "native-sh-library", + "native-sh-test", "no-effect", "output-group", "overly-nested-depset", @@ -326,6 +332,9 @@ func TestValidate(t *testing.T) { "native-package", // "native-proto", // "native-py", + "native-sh-binary", + "native-sh-library", + "native-sh-test", "no-effect", "output-group", "overly-nested-depset", @@ -387,6 +396,9 @@ func TestValidate(t *testing.T) { "native-package", // "native-proto", // "native-py", + "native-sh-binary", + "native-sh-library", + "native-sh-test", "no-effect", "output-group", "overly-nested-depset", diff --git a/buildifier/integration_test.sh b/buildifier/integration_test.sh index 3c1173b3b..85bee3d7b 100755 --- a/buildifier/integration_test.sh +++ b/buildifier/integration_test.sh @@ -288,6 +288,9 @@ cat > golden/.buildifier.example.json <