Inspectopedia
 
2024.3

Assignment can be replaced with operator assignment

Info
Code Style
Last modified: 03 December 2024

Reports assignments which can be replaced by an operator assignment.

Example:

After the quick-fix is applied:

Configure the inspection:

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

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