@@ -69,7 +69,7 @@ If you want to enforce that all code matches the required style, add the followi
69
69
70
70
NOTE: The source formatter does not fundamentally change your code.
71
71
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.
73
73
74
74
=== Checkstyle
75
75
@@ -207,7 +207,7 @@ Here are some tips that we've found useful when developing Spring Boot.
207
207
Some code isn't particularly amenable to automatic formatting.
208
208
For example, Spring Security configurations often work better when manually formatted.
209
209
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:
211
211
212
212
[source,java]
213
213
----
@@ -219,12 +219,15 @@ If you need to disable formatting for a specific block of code you can enclose i
219
219
----
220
220
221
221
==== 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.
228
231
229
232
==== Whitespace
230
233
Keeping whitespace lines out method bodies can help make the code easier to scan.
0 commit comments