Skip to content

Commit b77b526

Browse files
committed
Merge pull request #450 from scordio
* gh-450: Polish "Polish README" Polish README Closes gh-450
2 parents 77dc2f6 + 87cb6db commit b77b526

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

README.adoc

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ If you want to skip both, you can use `-Dspring-javaformat.skip=true`.
8181

8282

8383

84-
=== Checkstyle
85-
To enforce checksyle conventions add the checkstyle plugin and include a dependency on `spring-javaformat-checkstyle`:
84+
==== Checkstyle
85+
To enforce checkstyle conventions, add the checkstyle plugin and include a dependency on `spring-javaformat-checkstyle`:
8686

8787
[source,xml,indent=0,subs="normal"]
8888
----
@@ -149,7 +149,7 @@ For source formatting, add the `spring-javaformat-gradle-plugin` to your `build`
149149
The plugin adds `format` and `checkFormat` tasks to your project.
150150
The `checkFormat` task is automatically applied when running the standard Gradle `check` task.
151151

152-
In case you want to exclude a package from being checked, for example if you generate sources, you can do this by adding following configuration:
152+
In case you want to exclude a package from being checked, for example if you generate sources, you can do this by adding the following configuration:
153153

154154
[source,groovy,indent=0,subs="normal"]
155155
----
@@ -161,7 +161,7 @@ tasks.withType(io.spring.javaformat.gradle.tasks.CheckFormat) {
161161

162162

163163
==== Checkstyle
164-
To enforce checksyle conventions add the checkstyle plugin and include a dependency on `spring-javaformat-checkstyle`:
164+
To enforce checkstyle conventions, add the checkstyle plugin and include a dependency on `spring-javaformat-checkstyle`:
165165

166166
[source,groovy,indent=0,subs="normal"]
167167
----
@@ -208,9 +208,9 @@ java-baseline=8
208208
The Eclipse plugin provides a custom formatter implementation and automatically applies project specific settings.
209209
The plugin is automatically activated whenever the Maven or Gradle plugins are discovered in a project build script.
210210

211-
If you need to customize the project specific settings that the plugin applies you should add a `.eclipse` folder in the root of your project.
211+
If you need to customize the project specific settings that the plugin applies, you should add a `.eclipse` folder in the root of your project.
212212
All `.prefs` files from this folder will be copied to the project `.settings` folders.
213-
Usually you'll provide your own `org.eclipse.jdt.core.prefs` and `org.eclipse.jdt.ui.prefs` files.
213+
Usually, you'll provide your own `org.eclipse.jdt.core.prefs` and `org.eclipse.jdt.ui.prefs` files.
214214

215215
You can also add a `.eclipse/eclipse.properties` file to customize the following items:
216216

@@ -232,7 +232,7 @@ The plugin is automatically activated whenever the Maven or Gradle plugins are d
232232
A Spring Java Format icon (image:spring-javaformat-intellij-idea/spring-javaformat-intellij-idea-plugin/src/main/resources/spring-javaformat/formatOn.png[title="Icon"]) will also be displayed in the status bar to indicate the formatter is active.
233233
You can use the standard `code` -> `reformat code` action to format the code.
234234

235-
To install the plugin use the `spring-javaformat-intellij-idea-plugin` jar file.
235+
To install the plugin, use the `spring-javaformat-intellij-idea-plugin` jar file.
236236
You can download the latest version from https://repo1.maven.org/maven2/io/spring/javaformat/spring-javaformat-intellij-idea-plugin/{release-version}[Maven Central].
237237

238238

@@ -275,24 +275,24 @@ Once the configuration file is created, configure your IDE to use it:
275275

276276
=== Visual Studio Code
277277
The Visual Studio Code extension provides custom formatter support for Microsoft Visual Studio Code.
278-
The extension using the https://code.visualstudio.com/api/references/vscode-api#DocumentFormattingEditProvider[`DocumentFormattingEditProvider`] API.
278+
The extension uses the https://code.visualstudio.com/api/references/vscode-api#DocumentFormattingEditProvider[`DocumentFormattingEditProvider`] API.
279279
Once installed it may be activated by using the "`Format Document`" action available in the editor context menu or from the Command Palette.
280280

281-
To install the extension select "`Install from VSIX`" in the extensions panel and choose the `spring-javaformat-vscode-extension` vsix file.
281+
To install the extension, select "`Install from VSIX`" in the extensions panel and choose the `spring-javaformat-vscode-extension` vsix file.
282282
You can download the latest version from https://repo1.maven.org/maven2/io/spring/javaformat/spring-javaformat-vscode-extension/{release-version}[Maven Central].
283283

284284

285285

286286
=== About the Conventions
287-
Most of the coding conventions and style comes from the Spring Framework and Spring Boot projects.
288-
Spring Framework manually formats code, where as Spring Boot uses automatic formatting.
287+
Most of the coding conventions and style come from the Spring Framework and Spring Boot projects.
288+
Spring Framework manually formats code, whereas Spring Boot uses automatic formatting.
289289

290290

291291

292292
=== Indenting With Spaces
293-
By default tabs are used for indenting formatted code.
293+
By default, tabs are used for indenting formatted code.
294294
We strongly recommend that this default is not changed, especially for official Spring projects.
295-
If, however, you feel that you can't live with tabs then switching to spaces is the one configuration option that we do support.
295+
If, however, you feel that you can't live with tabs, switching to spaces is the one configuration option that we do support.
296296

297297
To use spaces rather than tabs, add a file called `.springjavaformatconfig` to the root of your project with the following content:
298298

@@ -331,7 +331,7 @@ If you want most `SpringChecks` but need to exclude one or two, you can do somet
331331
Some code isn't particularly amenable to automatic formatting.
332332
For example, Spring Security configurations often work better when manually formatted.
333333

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

336336
[source,java]
337337
----
@@ -350,17 +350,17 @@ making use of available horizontal space in your IDE and avoiding unwanted addit
350350
wrapping when viewing code on GitHub and the like.
351351

352352
If you're used to longer lines, 120 chars can take some getting used to. Specifically, if
353-
you have many nesting levels things can start to look quite bad. Generally, if you see
354-
code bunched up to the right of your screen you should take that as a signal to use the
353+
you have many nesting levels, things can start to look quite bad. Generally, if you see
354+
code bunched up to the right of your screen, you should take that as a signal to use the
355355
"`extract method`" refactor. Extracting small private methods will improve formatting and
356356
it helps when reading the code and debugging.
357357

358358

359359

360360
==== Whitespace
361361
Keeping whitespace lines out of method bodies can help make the code easier to scan.
362-
If blank lines are only included between methods it becomes easier to see the overall structure of the class.
363-
If you find you need whitespace inside your method, consider if extracting a private method might give a better result.
362+
If blank lines are only included between methods, it becomes easier to see the overall structure of the class.
363+
If you find you need whitespace inside your method, consider whether extracting a private method might give a better result.
364364

365365

366366

@@ -375,18 +375,18 @@ They will also ensure that `@author` tags are well formed.
375375

376376
==== Final
377377
Private members should be `final` whenever possible.
378-
Local variable and parameters should generally not be explicitly declared as final since it adds so much noise.
378+
Local variables and parameters should generally not be explicitly declared as final since it adds so much noise.
379379

380380

381381

382382
==== Read-down Methods, Fields and Parameters
383383
Methods don't need to be organized by scope.
384384
There's no need to group all `private`, `protected` and `public` methods together.
385-
Instead try to make your code easy to read when scanning the file from top to bottom.
386-
In other words, try to have methods only reference method further down in the file.
385+
Instead, try to make your code easy to read when scanning the file from top to bottom.
386+
In other words, try to have methods only reference methods further down in the file.
387387
Keep private methods as close to the thing that calls them as possible.
388388

389-
It's also recommend that you try to keep consistent ordering with fields and constructor parameters.
389+
It's also recommended that you try to keep consistent ordering with fields and constructor parameters.
390390
For example:
391391

392392
[source,java,indent=0,subs="normal"]

0 commit comments

Comments
 (0)