Skip to content

Conversation

SteLeo1602
Copy link
Contributor

Issue #17298

STILL WIP

@SteLeo1602
Copy link
Contributor Author

SteLeo1602 commented Jul 29, 2025

@romani I've pushed the pull with enabled inspection to show CI error, but I'm not really sure how to fix it.

https://app.circleci.com/pipelines/github/checkstyle/checkstyle/35470/workflows/1e5b0f40-9360-4683-8977-01a5f0315960/jobs/1018011/artifacts

There are many problems , but this is one of it

<problem>
<file>file://$PROJECT_DIR$/src/main/java/com/puppycrawl/tools/checkstyle/checks/NewlineAtEndOfFileCheck.java</file>
<line>48</line>
<module>project</module>
<package>com.puppycrawl.tools.checkstyle.checks</package>
<entry_point TYPE="class" FQNAME="com.puppycrawl.tools.checkstyle.checks.NewlineAtEndOfFileCheck"/>
<problem_class id="JavadocBlankLines" severity="WARNING" 
attribute_key="WARNING_ATTRIBUTES">
Blank line should be replaced with <p> to break lines</problem_class>
<description>Blank line will be ignored</description>
<highlighted_element>*</highlighted_element>
<language>JAVA</language>
<offset>1</offset>
<length>1</length>
</problem>

* <div class="wrapper"><pre class="prettyprint"><code class="language-text">
* &#64;&#64; -32,4 +32,5 &#64;&#64; ForbidWildcardAsReturnTypeCheck.returnTypeClassNamesIgnoreRegex
* PublicReferenceToPrivateTypeCheck.name = Public Reference To Private Type
*
* StaticMethodCandidateCheck.name = Static Method Candidate
* -StaticMethodCandidateCheck.desc = Checks whether private methods should be declared as static.
* \ No newline at end of file
* +StaticMethodCandidateCheck.desc = Checks whether private methods should be declared as static.
* +StaticMethodCandidateCheck.skippedMethods = Method names to skip during the check.
* </code></pre></div>

@romani
Copy link
Member

romani commented Jul 29, 2025

This bus definitely defect in inspection.
The only solution is try to upgrade inspection version, but it is also challenging, we already have two PRs on this.

@romani
Copy link
Member

romani commented Jul 29, 2025

This PR is blocked by #17280

@romani romani added the blocked label Jul 29, 2025
@Atharv3221
Copy link
Contributor

Atharv3221 commented Jul 29, 2025

@SteLeo1602
After changes re-import the file in inspection and restart ide to see problems at local

@Atharv3221
Copy link
Contributor

Its working as expected

<inspection_tool class="IteratorNextDoesNotThrowNoSuchElementException" enabled="true"
level="WARNING" enabled_by_default="true"/>
<!-- disabled until https://github.com/checkstyle/checkstyle/issues/17298 -->
<inspection_tool class="JavadocBlankLines" enabled="false" level="WARNING"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<inspection_tool class="JavadocBlankLines" enabled="true" level="WARNING"

level="WARNING" enabled_by_default="true"/>
<!-- disabled until https://github.com/checkstyle/checkstyle/issues/17298 -->
<inspection_tool class="JavadocBlankLines" enabled="false" level="WARNING"
enabled_by_default="false"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

               enabled_by_default="true"/>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works good on local, thanks

@Atharv3221
Copy link
Contributor

@SteLeo1602
I just wanna know why we are enabling this inspection ?
And what to do of current reported blank lines ?
I tried few things adding p tag it didn't worked well
Tried to add br tag but then tests are failing
Just removing doesn't seems ideal as readability will be compromised

@SteLeo1602
Copy link
Contributor Author

@SteLeo1602 I just wanna know why we are enabling this inspection ? And what to do of current reported blank lines ? I tried few things adding p tag it didn't worked well Tried to add br tag but then tests are failing Just removing doesn't seems ideal as readability will be compromised

The inspection itself already used to be enabled without any errors until I replaced <source> tags with wrappers in #17307, where I temporarily disabled this inspection so CI could pass. I'm not quite sure why we had this inspection on in first place.

I believe we want inspection to react properly on what we already have in javadoc since clearly it's broken and does not function properly on CI basis.

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

Successfully merging this pull request may close these issues.

3 participants