Inspectopedia 2024.3 Help

Assignment issues

Assignment could be replaced with operator assignment   New in this release

Reports an assignment operation that can be replaced by an operator assignment to make your code shorter and probably clearer.

Assignment to 'for' loop parameter   New in this release

Reports an assignment to a variable declared as a for loop parameter.

Assignment to function parameter   New in this release

Reports an assignment to a function parameter, including increment and decrement operations.

Assignment used as condition   New in this release

Reports an assignment that is used as the condition of an if, while, for, or do statement.

Nested assignment   New in this release

Reports an assignment expression nested inside another expression, for example, a = b = 1.

Result of assignment used   New in this release

Reports an assignment expression where the result of the assignment is used in the containing expression.

Variable is assigned to itself   New in this release

Reports an assignment in the form x = x.

Last modified: 11 September 2024