File: InvalidInlineTag.md

package info (click to toggle)
error-prone-java 2.18.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 23,204 kB
  • sloc: java: 222,992; xml: 1,319; sh: 25; makefile: 7
file content (45 lines) | stat: -rw-r--r-- 900 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
A non-standard Javadoc inline tag was used, or was used in the wrong way. For
example, `@param` should be used as a block tag to describe parameters, but
cannot be used inline to link to parameters (prefer `{@code paramName}` for
that).

```java
/**
 * Doubles {@param n}.
 */
int twoTimes(int n) {
  return 2 * n;
}
```

```java
/**
 * Doubles {@code n}.
 */
int twoTimes(int n) {
  return 2 * n;
}
```

If the `@` symbol occurrs inside a code excerpt, the fix is to escape the code
excerpt using `<pre>{@code ... }</pre>`:

```java
/**
 * Summary fragment.
 *
 * <pre>{@code
 * Your code here.
 * Can include <angle brackets>.
 * You can even include snippets that contain annotations, e.g.:
 * @Override public String toString() { ... }
 * }</pre>
 *
 * <p>Following paragraph.
 */
```

## Suppression

Suppress by applying `@SuppressWarnings("InvalidInlineTag")` to the element
being documented.