Skip to content

Commit 379a03d

Browse files
authored
Add <p> tags to Javadoc comments (#1863)
2 parents 508a4be + 0189f71 commit 379a03d

35 files changed

+83
-83
lines changed

lib-extra/src/main/java/com/diffplug/spotless/extra/GitAttributesLineEndings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ static class Runtime {
246246

247247
/**
248248
* Default line ending, determined in this order (paths are a teensy different platform to platform).
249-
*
249+
* <p>
250250
* - .git/config (per-repo)
251251
* - ~/.gitconfig (per-user)
252252
* - /etc/gitconfig (system-wide)

lib-extra/src/main/java/com/diffplug/spotless/extra/GitWorkarounds.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 DiffPlug
2+
* Copyright 2020-2023 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -42,7 +42,7 @@ private GitWorkarounds() {}
4242

4343
/**
4444
* Finds the .git directory for the given project directory.
45-
*
45+
* <p>
4646
* Ordinarily one would just use JGit for this, but it doesn't support worktrees properly.
4747
* So this applies an additional workaround for that.
4848
*
@@ -55,7 +55,7 @@ private GitWorkarounds() {}
5555

5656
/**
5757
* Creates a {@link RepositorySpecificResolver} for the given project directory.
58-
*
58+
* <p>
5959
* This applies a workaround for JGit not supporting worktrees properly.
6060
*
6161
* @param projectDir the project directory.
@@ -67,7 +67,7 @@ static RepositorySpecificResolver fileRepositoryResolverForProject(File projectD
6767

6868
/**
6969
* Creates a {@link RepositorySpecificResolver} for the given project directory.
70-
*
70+
* <p>
7171
* This applies a workaround for JGit not supporting worktrees properly.
7272
*
7373
* @param projectDir the project directory.
@@ -86,7 +86,7 @@ static RepositorySpecificResolver fileRepositoryResolverForProject(File projectD
8686

8787
/**
8888
* Piggyback on the {@link FileRepositoryBuilder} mechanics for finding the git directory.
89-
*
89+
* <p>
9090
* Here we take into account that git repositories can share a common directory. This directory
9191
* will contain ./config ./objects/, ./info/, and ./refs/.
9292
*/

lib-extra/src/main/java/com/diffplug/spotless/extra/cpp/EclipseCdtFormatterStep.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
/**
2929
* Formatter step which calls out to the Eclipse CDT formatter.
30-
*
30+
* <p>
3131
* Eclipse-CDT <code>org.eclipse.core.contenttype.contentTypes</code>
3232
* extension <code>cSource</code>, <code>cHeader</code>, <code>cxxSource</code> and <code>cxxHeader</code>.
3333
* can handle: "c", "h", "C", "cpp", "cxx", "cc", "c++", "h", "hpp", "hh", "hxx", "inc"

lib-extra/src/main/java/com/diffplug/spotless/extra/integration/DiffMessageFormatter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@ private String diff(File file) throws IOException {
249249

250250
/**
251251
* Returns a git-style diff between the two unix strings.
252-
*
252+
* <p>
253253
* Output has no trailing newlines.
254-
*
254+
* <p>
255255
* Boolean args determine whether whitespace or line endings will be visible.
256256
*/
257257
private static String diffWhitespaceLineEndings(String dirty, String clean, boolean whitespace, boolean lineEndings) throws IOException {
@@ -278,7 +278,7 @@ private static String diffWhitespaceLineEndings(String dirty, String clean, bool
278278

279279
/**
280280
* Makes the whitespace and/or the lineEndings visible.
281-
*
281+
* <p>
282282
* MyersDiff wants inputs with only unix line endings. So this ensures that that is the case.
283283
*/
284284
private static String visibleWhitespaceLineEndings(String input, boolean whitespace, boolean lineEndings) {

lib-extra/src/test/java/com/diffplug/spotless/extra/groovy/GrEclipseFormatterStepSpecialCaseTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
public class GrEclipseFormatterStepSpecialCaseTest {
2525
/**
2626
* https://github.com/diffplug/spotless/issues/1657
27-
*
27+
* <p>
2828
* broken: ${parm == null ? "" : "<tag>$parm</tag>"}
2929
* works: ${parm == null ? "" : "<tag>parm</tag>"}
3030
*/

lib/src/main/java/com/diffplug/spotless/FeatureClassLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* but linked against the `Url[]`. This allows us to ship classfiles which function as glue
3535
* code but delay linking/definition to runtime after the user has specified which version
3636
* of the formatter they want.
37-
*
37+
* <p>
3838
* For `"org.slf4j.` and (`com.diffplug.spotless.` but not `com.diffplug.spotless.extra.`)
3939
* the classes are loaded from the buildToolClassLoader.
4040
*/

lib/src/main/java/com/diffplug/spotless/ForeignExe.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2021 DiffPlug
2+
* Copyright 2020-2023 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@
2727
* Finds a foreign executable and checks its version.
2828
* If either part of that fails, it shows you why
2929
* and helps you fix it.
30-
*
30+
* <p>
3131
* Usage: {@code ForeignExe.nameAndVersion("grep", "2.5.7").confirmVersionAndGetAbsolutePath()}
3232
* will find grep, confirm that it is version 2.5.7, and then return.
3333
*/

lib/src/main/java/com/diffplug/spotless/FormatExceptionPolicy.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2021 DiffPlug
2+
* Copyright 2016-2023 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@ public interface FormatExceptionPolicy extends Serializable, NoLambda {
2424

2525
/**
2626
* Returns a byte array representation of everything inside this {@code FormatExceptionPolicy}.
27-
*
27+
* <p>
2828
* The main purpose of this method is to ensure one can't instantiate this class with lambda
2929
* expressions, which are notoriously difficult to serialize and deserialize properly.
3030
*/

lib/src/main/java/com/diffplug/spotless/Formatter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public void applyTo(File file) throws IOException {
193193

194194
/**
195195
* Applies formatting to the given file.
196-
*
196+
* <p>
197197
* Returns null if the file was already clean, or the
198198
* formatted result with unix newlines if it was not.
199199
*/

lib/src/main/java/com/diffplug/spotless/FormatterFunc.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ interface Closeable extends FormatterFunc, AutoCloseable {
4242

4343
/**
4444
* Dangerous way to create a {@link Closeable} from an AutoCloseable and a function.
45-
*
45+
* <p>
4646
* It's important for FormatterStep's to allocate their resources as lazily as possible.
4747
* It's easy to create a resource inside the state, and not realize that it may not be
4848
* released. It's far better to use one of the non-deprecated {@code of()} methods below.
49-
*
49+
* <p>
5050
* The bug (and its fix) which is easy to write using this method: https://github.com/diffplug/spotless/commit/7f16ecca031810b5e6e6f647e1f10a6d2152d9f4
5151
* How the {@code of()} methods below make the correct thing easier to write and safer: https://github.com/diffplug/spotless/commit/18c10f9c93d6f18f753233d0b5f028d5f0961916
5252
*/

0 commit comments

Comments
 (0)