Don't flag conditional expressions that call rules as no-effect (#1541)
BUILD files don't support `if` statements, so a conditional expression
is the only way to choose between rules inline, as in rules_java's
`toolchains/BUILD`:
```starlark
toolchain_type(
name = "toolchain_type",
) if bazel_features.java._toolchain_type_in_rules_java else alias(
name = "toolchain_type",
actual = "@bazel_tools//tools/jdk:toolchain_type",
)
```
`no-effect` flagged such statements even though they call a rule, which
required a `# buildifier: disable=no-effect` comment. A conditional
expression statement is now treated like a call if either of its
branches is a call, possibly nested in parentheses or further
conditional expressions. Conditional expressions without calls are still
flagged.
This repository contains developer tools for working with Google's bazel buildtool.
See instructions in each tool's directory.