no-restated-comment
Short standalone comment lexically restates the immediately following simple action.
Why
When a comment adds no rationale, scope, ordering, or constraint, it duplicates code and can become stale. Preserve comments that add a constraint or rationale rather than restating identifiers.
Fix
Delete it if it merely narrates one statement. Preserve or rewrite comments that explain a reason, constraint, consequence, ordering requirement, or meaningful region label.
Examples
def load_profile(profile_id): # Get profile by ID return get_profile_by_id(profile_id)def load_profile(profile_id): # The replica may lag after signup, so read from primary. return get_profile_by_id(profile_id)