Why this matters
Keeping lines under 120 characters improves readability, especially on smaller screens or in side-by-side code comparisons.
Detect lines exceeding 120 characters and suggest breaking them into multiple lines for better readability.
Keeping lines under 120 characters improves readability, especially on smaller screens or in side-by-side code comparisons.
Side-by-side examples engineers can pattern-match during review.
def example
long_line = "This is an example of a line that is way too long and exceeds the recommended limit of 120 characters."
enddef example
long_line = "This is an example of a line that is way too long and " \
"exceeds the recommended limit of 120 characters."
end
def example
long_line = "This is an example of a line that is way too long and exceeds the recommended limit of 120 characters."
enddef example
long_line = "This is an example of a line that is way too long and " \
"exceeds the recommended limit of 120 characters."
end
From the same buckets as this rule.
Check if loops use equality operators (== or !=) in termination conditions. These can lead to infinite loops if the condition is never met exactly. Instead, use relational operators like < or > for safer loop termination.