Skip to content

Commit

Permalink
Formatting in Javadoc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst committed Aug 5, 2022
1 parent 0129a20 commit ed9e170
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* <p>Parameters and fields are treated as if they have this annotation by default unless they have
* {@link Owning}.
*
* <p>When the -AnoLightweightOwnership command-line argument is passed to the checker, this
* <p>When the {@code -AnoLightweightOwnership} command-line argument is passed to the checker, this
* annotation and {@link Owning} are ignored.
*
* @checker_framework.manual #resource-leak-checker Resource Leak Checker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* annotated as {@link NotOwning}. Parameters and fields are treated as {@link NotOwning} by
* default.
*
* <p>When the -AnoLightweightOwnership command-line argument is passed to the checker, this
* <p>When the {@code -AnoLightweightOwnership} command-line argument is passed to the checker, this
* annotation and {@link NotOwning} are ignored.
*
* @checker_framework.manual #resource-leak-checker Resource Leak Checker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.checkerframework.framework.test.CheckerFrameworkPerDirectoryTest;
import org.junit.runners.Parameterized.Parameters;

/** Tests -AparseAllJdk option. */
/** Tests {@code -AparseAllJdk} option. */
public class ParseAllJdkTest extends CheckerFrameworkPerDirectoryTest {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected static String astubsArgFromFiles(List<File> sourceFiles) {
*
* @param sourceFiles the list of source files
* @param extension the extension to use: either .astub or .ajava
* @return the appropriate -Aajava or -Astubs argument
* @return the appropriate {@code -Aajava} or {@code -Astubs} argument
*/
private static String annotationArgFromFiles(
List<File> sourceFiles, @StringVal({".astub", ".ajava"}) String extension) {
Expand All @@ -105,8 +105,8 @@ private static String annotationArgFromFiles(
}

/**
* Generates the correct argument to the -Aajava or -Astubs CF option corresponding to the source
* file {@code sourceFile} and the wpi output type.
* Generates the correct argument to the {@code -Aajava} or {@code -Astubs} CF option
* corresponding to the source file {@code sourceFile} and the wpi output type.
*
* @param sourceFile a java source file
* @param extension the extension to use: either .astub or .ajava
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ protected CheckerFrameworkWPIPerDirectoryTest(
* Do not typecheck any file ending with the given String. Use this routine to avoid typechecking
* files in the all-systems test suite that are problematic for one typechecker. For example, this
* routine is useful when running the all-systems tests using WPI, because some all-systems tests
* have expected errors that become warnings during a WPI run (because of -Awarns) and so must be
* excluded.
* have expected errors that become warnings during a WPI run (because of {@code -Awarns}) and so
* must be excluded.
*
* <p>This code takes advantage of the mutability of the {@link #testFiles} field.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public class BaseTypeVisitor<Factory extends GenericAnnotatedTypeFactory<?, ?, ?
/** The factory to use for obtaining "parsed" version of annotations. */
protected final Factory atypeFactory;

/** For obtaining line numbers in -Ashowchecks debugging output. */
/** For obtaining line numbers in {@code -Ashowchecks} debugging output. */
protected final SourcePositions positions;

/** The element for java.util.Vector#copyInto. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ enum OutputFormat {

/**
* Output the results of whole-program inference as an ajava file that can be read in using the
* -Aajava option.
* {@code -Aajava} option.
*/
AJAVA(),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
* some JavaParser node. Some trees shouldn't be matched with a JavaParser node because there isn't
* a corresponding JavaParser node. These trees are excluded.
*
* <p>The primary purpose is to test the {@link JointJavacJavaParserVisitor} class when the
* -AajavaChecks flag is used. That class traverses a javac tree and JavaParser AST simultaneously,
* <p>The primary purpose is to test the {@link JointJavacJavaParserVisitor} class when the {@code
* -AajavaChecks} flag is used. That class traverses a javac tree and JavaParser AST simultaneously,
* so the trees this class stores can be used to test if the entirety of the javac tree was visited.
*/
public class ExpectedTreesVisitor extends TreeScannerWithDefaults {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,8 @@ public abstract class SourceChecker extends AbstractTypeProcessor implements Opt
protected SourceVisitor<?, ?> visitor;

/**
* Exceptions to -AwarnUnneededSuppressions processing. No warning about unneeded suppressions is
* issued if the SuppressWarnings string matches this pattern.
* Exceptions to {@code -AwarnUnneededSuppressions} processing. No warning about unneeded
* suppressions is issued if the SuppressWarnings string matches this pattern.
*/
private @Nullable Pattern warnUnneededSuppressionsExceptions;

Expand Down Expand Up @@ -1276,13 +1276,13 @@ protected Object processArg(Object arg) {
public static final String DETAILS_SEPARATOR = " $$ ";

/**
* Returns all but the message key part of the message format output by -Adetailedmsgtext.
* Returns all but the message key part of the message format output by {@code -Adetailedmsgtext}.
*
* @param source the object from which to obtain source position information; may be an Element, a
* Tree, or null
* @param defaultFormat the message key, in parentheses
* @param args arguments for interpolation in the string corresponding to the given message key
* @return the first part of the message format output by -Adetailedmsgtext
* @return the first part of the message format output by {@code -Adetailedmsgtext}
*/
private String detailedMsgTextPrefix(Object source, String defaultFormat, Object[] args) {
StringJoiner sj = new StringJoiner(DETAILS_SEPARATOR);
Expand Down Expand Up @@ -1865,10 +1865,12 @@ public final Set<String> getSupportedAnnotationTypes() {
///

/**
* Returns the argument to -AsuppressWarnings, split on commas, or null if no such argument. Only
* ever called once; the value is cached in field {@link #suppressWarningsStringsFromOption}.
* Returns the argument to {@code -AsuppressWarnings}, split on commas, or null if no such
* argument. Only ever called once; the value is cached in field {@link
* #suppressWarningsStringsFromOption}.
*
* @return the argument to -AsuppressWarnings, split on commas, or null if no such argument
* @return the argument to {@code -AsuppressWarnings}, split on commas, or null if no such
* argument
*/
private String @Nullable [] getSuppressWarningsStringsFromOption() {
Map<String, String> options = getOptions();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3774,8 +3774,8 @@ private static final boolean validType(TypeMirror type) {
* exists and ignorejdkastub option is not supplied <br>
* <li>Stub files listed in @StubFiles annotation on the checker; must be in same directory as
* the checker<br>
* <li>Stub files provided via -Astubs compiler option
* <li>Ajava files provided via -Aajava compiler option
* <li>Stub files provided via {@code -Astubs} compiler option
* <li>Ajava files provided via {@code -Aajava} compiler option
* </ol>
*
* <p>If a type is annotated with a qualifier from the same hierarchy in more than one stub file,
Expand Down

0 comments on commit ed9e170

Please sign in to comment.