Skip to content

Commit

Permalink
Issue checkstyle#15218: formatted input files for section 7.1.2 parag…
Browse files Browse the repository at this point in the history
…raphs to follow google style guide rules
  • Loading branch information
Zopsss authored and romani committed Jul 19, 2024
1 parent 460eef6 commit 9ee7748
Show file tree
Hide file tree
Showing 4 changed files with 163 additions and 150 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,67 +4,72 @@
* Some Javadoc.
*
* <p>Some Javadoc.
*
*/
class InputCorrectJavadocParagraph {

/**
* Some Javadoc.
*
* <p>{@code function} will never be invoked with a null value.
*
* @since 8.0
*/
public static final byte NUL = 0;
/**
* Some Javadoc.
*
* <p>{@code function} will never be invoked with a null value.
*
* @since 8.0
*/
public static final byte NUL = 0;

/**
* Some Javadoc.
*
* <p>Some Javadoc.
*
* <pre>
* class Foo {
*
* void foo() {}
* }
* </pre>
*
* @see <a
* href="http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideModules">
* Documentation about GWT emulated source</a>
*/
boolean emulated() {
return false;
}

/**
* Some Javadoc.
*
* <p>Some Javadoc.
*/
class InnerInputCorrectJavaDocParagraphCheck {

/**
* Some Javadoc.
*
* <p>Some Javadoc.
*
* <pre>
* class Foo {
*
* void foo() {}
* }
* </pre>
* <p>Some Javadoc.
*
* @see <a href="http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideModules">
* Documentation about GWT emulated source</a>
* @since 8.0
*/
boolean emulated() {return false;}
public static final byte NUL = 0;

/**
* Some Javadoc.
*
* <p>Some Javadoc.
*
* @see <a
* href="http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideModules">
* Documentation about GWT emulated source</a>
*/
class InnerInputCorrectJavaDocParagraphCheck {

/**
* Some Javadoc.
*
* <p>Some Javadoc.
*
* <p>Some Javadoc.
*
* @since 8.0
*/
public static final byte NUL = 0;

/**
* Some Javadoc.
*
* <p>Some Javadoc.
*
* @see <a href="http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideModules">
* Documentation about GWT emulated source</a>
*/
boolean emulated() {return false;}
boolean emulated() {
return false;
}
}

InnerInputCorrectJavaDocParagraphCheck anon = new InnerInputCorrectJavaDocParagraphCheck() {
InnerInputCorrectJavaDocParagraphCheck anon =
new InnerInputCorrectJavaDocParagraphCheck() {

/**
* Some Javadoc.
Expand All @@ -84,9 +89,12 @@ class InnerInputCorrectJavaDocParagraphCheck {
*
* <p>Some Javadoc.
*
* @see <a href="http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideModules">
* @see <a
* href="http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideModules">
* Documentation about GWT emulated source</a>
*/
boolean emulated() {return false;}
};
boolean emulated() {
return false;
}
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,30 @@
*/
class InputCorrectRequireEmptyLineBeforeBlockTagGroup {

/**
* This javadoc does not have a tag. There should be no violations.
*/
public static final byte NO_TAG = 0;
/** This javadoc does not have a tag. There should be no violations. */
public static final byte NO_TAG = 0;

/**
* This Javadoc has one tag, with an empty line. There should be no violations.
*
* @since 8.36
*/
public static final byte ONE_TAG = 0;
/**
* This Javadoc has one tag, with an empty line. There should be no violations.
*
* @since 8.36
*/
public static final byte ONE_TAG = 0;

/**
* This Javadoc has multiple tags, with an empty line before them. There should be no
* violations.
*
* @param input this is the first tag
* @return this is the second tag
*/
public static boolean test(boolean input) {
return false;
}
/**
* This Javadoc has multiple tags, with an empty line before them. There should be no violations.
*
* @param input this is the first tag
* @return this is the second tag
*/
public static boolean test(boolean input) {
return false;
}

/**
* @return this only has a tag.
*/
public static boolean test() {
return false;
}
/**
* @return this only has a tag.
*/
public static boolean test() {
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,91 +6,97 @@
/**
* Some Javadoc.
* <p>
* /^ WARN/ Some Javadoc.<p>
*
* /^ WARN/ Some Javadoc.<p>
*/
// 2 violations 3 lines above:
// 2 violations 2 lines above:
// '\<p\> tag should be placed immediately before the first word'
// '\<p\> tag should be preceded with an empty line.'

class InputIncorrectJavadocParagraph {

// 2 violations 4 lines below:
// '\<p\> tag should be placed immediately before the first word'
// '\<p\> tag should be preceded with an empty line.'
/**
* Some Javadoc.<p>
*
* <p> Some Javadoc.
*
* @since 8.0
*/
// violation 4 lines above '\<p\> tag should be placed immediately before the first word'
public static final byte NUL = 0;

// violation 2 lines below '\<p\> tag should be preceded with an empty line.'
/**
* Some <p>Javadoc.
*
* <p>Some Javadoc.
*
* @see <a
* href="http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideModules">
* Documentation about GWT emulated source</a>
*/
boolean emulated() {
return false;
}

// violation 4 lines below 'Redundant \<p\> tag.'
// 2 violations 4 lines below:
// '\<p\> tag should be placed immediately before the first word'
// '\<p\> tag should be preceded with an empty line.'
/**<p>Some Javadoc.
* <p>
* <p><p>
* <p>/^WARN/ Some Javadoc.<p>
*/
// 2 violations 3 lines above:
// '\<p\> tag should be placed immediately before the first word'
// '\<p\> tag should be preceded with an empty line.'
// 2 violations 5 lines above:
// '\<p\> tag should be placed immediately before the first word'
// '\<p\> tag should be preceded with an empty line.'
class InnerInputCorrectJavaDocParagraphCheck {

// 2 violations 4 lines below:
// '\<p\> tag should be placed immediately before the first word'
// '\<p\> tag should be preceded with an empty line.'
/**
* Some Javadoc.<P>
*
* <p> Some Javadoc.
* Some Javadoc.<p>
*
* @since 8.0
*/
// violation 4 lines above '\<p\> tag should be placed immediately before the first word'
public static final byte NUL = 0;

// violation 2 lines below '\<p\> tag should be preceded with an empty line.'
/**
* Some <p>Javadoc.
*
* <p>Some Javadoc.
*
* @see <a href="http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideModules">
* Documentation about GWT emulated source</a>
*/
boolean emulated() {return false;}

// violation 4 lines below 'Redundant \<p\> tag.'
// 2 violations 4 lines below:
// '\<p\> tag should be placed immediately before the first word'
// '\<p\> tag should be preceded with an empty line.'
/**<p>Some Javadoc.
// '\<p\> tag should be placed immediately before the first word'
// 'Redundant \<p\> tag.'
// violation 4 lines below '\<p\> tag should be placed immediately before the first word'
/**<p>
* /^WARN/ Some Javadoc.
*
* <P>
* /^WARN/
* <p>
* <p><p>
* <p>/^WARN/ Some Javadoc.<p>
* /^WARN/ Some Javadoc.<p>
* @see <a
* href="http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideModules">
* Documentation about GWT emulated source</a>
*/
// 2 violations 3 lines above:
// 2 violations 6 lines above:
// '\<p\> tag should be placed immediately before the first word'
// '\<p\> tag should be preceded with an empty line.'
// 2 violations 5 lines above:
// 2 violations 8 lines above:
// '\<p\> tag should be placed immediately before the first word'
// '\<p\> tag should be preceded with an empty line.'
class InnerInputCorrectJavaDocParagraphCheck {

// 2 violations 4 lines below:
// '\<p\> tag should be placed immediately before the first word'
// '\<p\> tag should be preceded with an empty line.'
/**
* Some Javadoc.<p>
*
* @since 8.0
*/
public static final byte NUL = 0;

// 2 violations 4 lines below:
// '\<p\> tag should be placed immediately before the first word'
// 'Redundant \<p\> tag.'
// violation 4 lines below '\<p\> tag should be placed immediately before the first word'
/**<p>
* /^WARN/ Some Javadoc.
*
* <P>
* /^WARN/
* <p>
* /^WARN/ Some Javadoc.<p>
* @see <a href="http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideModules">
* Documentation about GWT emulated source</a>
*/
// 2 violations 5 lines above:
// '\<p\> tag should be placed immediately before the first word'
// '\<p\> tag should be preceded with an empty line.'
// 2 violations 7 lines above:
// '\<p\> tag should be placed immediately before the first word'
// '\<p\> tag should be preceded with an empty line.'
// violation 9 lines above 'Javadoc tag '@see' should be preceded with an empty line.'
boolean emulated() {return false;}
// violation 10 lines above 'Javadoc tag '@see' should be preceded with an empty line.'
boolean emulated() {
return false;
}
}

InnerInputCorrectJavaDocParagraphCheck anon = new InnerInputCorrectJavaDocParagraphCheck() {
InnerInputCorrectJavaDocParagraphCheck anon =
new InnerInputCorrectJavaDocParagraphCheck() {

// violation 2 lines below 'Redundant \<p\> tag.'
/**
Expand All @@ -117,6 +123,8 @@ class InnerInputCorrectJavaDocParagraphCheck {
// 2 violations 2 lines above:
// '\<p\> tag should be placed immediately before the first word'
// '\<p\> tag should be preceded with an empty line.'
boolean emulated() {return false;}
};
boolean emulated() {
return false;
}
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@
// violation 2 lines above'Javadoc tag '@since' should be preceded with an empty line.'
class InputIncorrectRequireEmptyLineBeforeBlockTagGroup {

/**
* This documents the private method.
* @param thisParamTagNeedsNewline this documents the parameter.
*/
// violation 2 lines above 'Javadoc tag '@param' should be preceded with an empty line.'
private boolean paramTagNeedsNewline(boolean thisParamTagNeedsNewline) {
return false;
}
/**
* This documents the private method.
* @param thisParamTagNeedsNewline this documents the parameter.
*/
// violation 2 lines above 'Javadoc tag '@param' should be preceded with an empty line.'
private boolean paramTagNeedsNewline(boolean thisParamTagNeedsNewline) {
return false;
}

/**
* This documents the private method.
* @param thisParamTagNeedsNewline this documents the parameter.
* @return this one does not need an empty line, but the tag before this one does.
*/
// violation 3 lines above 'Javadoc tag '@param' should be preceded with an empty line.'
private boolean paramMultiTagNeedsNewline(boolean thisParamTagNeedsNewline) {
return false;
}
/**
* This documents the private method.
* @param thisParamTagNeedsNewline this documents the parameter.
* @return this one does not need an empty line, but the tag before this one does.
*/
// violation 3 lines above 'Javadoc tag '@param' should be preceded with an empty line.'
private boolean paramMultiTagNeedsNewline(boolean thisParamTagNeedsNewline) {
return false;
}
}

0 comments on commit 9ee7748

Please sign in to comment.