Skip to content

https://errorprone.info/bugpattern/OperatorPrecedence #760

Open
@blacelle

Description

If existing, a reference to the rule from the external system :

Please also provide code examples before -> after.

After:

boolean d = (a && b) || c;",
boolean e = (a || b) ? c : d;",
int z = (x + y) << 2;";

Before

boolean r = a && b || c;",
boolean e = a || b ? c : d;",
int z = x + y << 2;";

You want also want to implement a mutator by your self:

  • Consider eu.solven.cleanthat.engine.java.refactorer.mutators.EmptyControlStatement as an example
  • Add tests in eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me.EmptyControlStatementCases
  • Wire tests through eu.solven.cleanthat.engine.java.refactorer.cases.TestEmptyControlStatementCases
  • Open a PR from a personal fork, allowing maintainers to edit your PR.
  • Thanks!

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions