Skip to content

Commit dfb732d

Browse files
committed
Update README's wrapping section after move to 120 chars
Closes gh-118
1 parent 89715d5 commit dfb732d

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

README.adoc

+11-8
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ If you want to enforce that all code matches the required style, add the followi
6969

7070
NOTE: The source formatter does not fundamentally change your code.
7171
For example, it will not change the order of import statements.
72-
It is effectively limited to adding or removing whitespace and line feeds.
72+
It is effectively limited to adding or removing whitespace and line feeds.
7373

7474
=== Checkstyle
7575

@@ -207,7 +207,7 @@ Here are some tips that we've found useful when developing Spring Boot.
207207
Some code isn't particularly amenable to automatic formatting.
208208
For example, Spring Security configurations often work better when manually formatted.
209209

210-
If you need to disable formatting for a specific block of code you can enclose it in a `@formatter:off` / `@formatter:on` set:
210+
If you need to disable formatting for a specific block of code you can enclose it in a `@formatter:off` / `@formatter:on` set:
211211

212212
[source,java]
213213
----
@@ -219,12 +219,15 @@ If you need to disable formatting for a specific block of code you can enclose i
219219
----
220220

221221
==== Wrapping
222-
The source formatter intentionally uses a low character count of 90 chars for wrapping.
223-
If you're used to longer lines, this can take some getting used to.
224-
Specifically, if you have many nesting levels things can start to look quite bad.
225-
226-
Generally, if you see code bunched up to the right of your screen you should take that as a signal to use the "`extract method`" refactor.
227-
Extracting small private methods will improve formatting and it helps when reading the code and debugging.
222+
The source formatter uses 120 chars for wrapping. This aims to strike a balance between
223+
making use of available horizontal space in your IDE and avoiding unwanted additional
224+
wrapping when viewing code on GitHub and the like.
225+
226+
If you're used to longer lines, 120 chars can take some getting used to. Specifically, if
227+
you have many nesting levels things can start to look quite bad. Generally, if you see
228+
code bunched up to the right of your screen you should take that as a signal to use the
229+
"`extract method`" refactor. Extracting small private methods will improve formatting and
230+
it helps when reading the code and debugging.
228231

229232
==== Whitespace
230233
Keeping whitespace lines out method bodies can help make the code easier to scan.

0 commit comments

Comments
 (0)