---
title: Keep lines under 120 characters
impact: LOW
impactDescription: Improve code readability and prevent horizontal scrolling.
tags: ruby, formatting, readability, side-scrolling
---

## Keep lines under 120 characters

Improve code readability and prevent horizontal scrolling. Limit line length to 120 characters maximum. Break long lines into multiple lines when necessary.

**Incorrect:**

```ruby
puts "This is an extremely long string that definitely exceeds the recommended limit of one hundred and twenty characters that we have set for our coding standards in this project."
```

**Correct:**

```ruby
puts "This is an extremely long string that definitely exceeds " \
     "the recommended limit of one hundred and twenty characters..."
```

**Tools:** RuboCop (`Layout/LineLength`)
