Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code cleanup: to make updates to xdoc easy to review #3934

Closed
romani opened this issue Mar 5, 2017 · 1 comment · Fixed by #7993
Closed

code cleanup: to make updates to xdoc easy to review #3934

romani opened this issue Mar 5, 2017 · 1 comment · Fixed by #7993
Milestone

Comments

@romani
Copy link
Member

romani commented Mar 5, 2017

apply patch:

$ git diff
diff --git a/src/xdocs/config_blocks.xml b/src/xdocs/config_blocks.xml
index 65a4327..ac72e26 100644
--- a/src/xdocs/config_blocks.xml
+++ b/src/xdocs/config_blocks.xml
@@ -799,7 +799,8 @@ for(int i = 0; i < 10; value.incrementValue()); // OK
             <a
              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#STATIC_INIT">STATIC_INIT</a>,
             <a
-             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INSTANCE_INIT">INSTANCE_INIT</a>.</td>
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INSTANCE_INIT">INSTANCE_INIT</a>
+            .</td>
 
             <td><a
              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_TRY">LITERAL_TRY</a>,
@@ -810,7 +811,8 @@ for(int i = 0; i &lt; 10; value.incrementValue()); // OK
             <a
              href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_IF">LITERAL_IF</a>,
             <a
-             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_ELSE">LITERAL_ELSE</a>.</td>
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_ELSE">LITERAL_ELSE</a>
+            .</td>
           </tr>
         </table>
       </subsection>
diff --git a/src/xdocs/config_whitespace.xml b/src/xdocs/config_whitespace.xml
index 49513b7..96362bf 100644
--- a/src/xdocs/config_whitespace.xml
+++ b/src/xdocs/config_whitespace.xml
@@ -831,7 +831,8 @@ sort(list, Comparable::&lt;String&gt;compareTo);             // Method reference
             <td><a
             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PACKAGE_DEF">PACKAGE_DEF</a>,
             <a
-             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#IMPORT">IMPORT</a>.</td>
+             href="apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#IMPORT">IMPORT</a>
+            .</td>
           </tr>
         </table>
       </subsection>

patch is required to avoid changes on existing lines when new token is added

resolve UT failure:

Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.345 sec <<< FAILURE! - in com.puppycrawl.tools.checkstyle.internal.XdocsPagesTest
testAllCheckSections(com.puppycrawl.tools.checkstyle.internal.XdocsPagesTest)  Time elapsed: 0.181 sec  <<< FAILURE!
org.junit.ComparisonFailure: config_whitespace.xml section 'NoLineWrap' should have all the default tokens expected:<PACKAGE_DEF, IMPORT[].> but was:<PACKAGE_DEF, IMPORT[ ].>
	at com.puppycrawl.tools.checkstyle.internal.XdocsPagesTest.validatePropertySectionPropertyTokens(XdocsPagesTest.java:563)
	at com.puppycrawl.tools.checkstyle.internal.XdocsPagesTest.validatePropertySectionProperties(XdocsPagesTest.java:506)
	at com.puppycrawl.tools.checkstyle.internal.XdocsPagesTest.validatePropertySection(XdocsPagesTest.java:419)
	at com.puppycrawl.tools.checkstyle.internal.XdocsPagesTest.validateCheckSection(XdocsPagesTest.java:351)
	at com.puppycrawl.tools.checkstyle.internal.XdocsPagesTest.testAllCheckSections(XdocsPagesTest.java:280)

nikhilgupta23 added a commit to nikhilgupta23/checkstyle that referenced this issue Mar 6, 2017
@romani
Copy link
Member Author

romani commented Apr 14, 2017

Problem is the same, we need to move for punctuation to new line to minimize diff when new token is added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants