Back to Intellij Community

GroovyAssignmentCanBeOperatorAssignment

plugins/groovy/groovy-psi/resources/inspectionDescriptions/GroovyAssignmentCanBeOperatorAssignment.html

2025.3-rc-2342 B
Original Source

Reports assignments which can be replaced by an operator assignment.

Example:

a = a + b

After the quick-fix is applied:

a += b

Configure the inspection:

  • Use the Ignore conditional operators option to ignore && and || operators.
  • Use the Ignore obscure operators option to ignore ^ and % operators.