Skip to content

Latest commit

 

History

History
13 lines (7 loc) · 433 Bytes

increment-decrement.md

File metadata and controls

13 lines (7 loc) · 433 Bytes

Pattern: Missing use of += 1/-= 1

Issue: -

Description

Enforces using explicit += 1 or -= 1 operators.

Rationale: It’s easy to type +i or -i instead of –i or ++i, and won’t always result in invalid code. Prefer standardizing small arithmetic operations with the explicit += and -= operators.

Further Reading