-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Issue #13934: Version updated from 3.2 to 3.4 #13945
Conversation
src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheck.java
Outdated
Show resolved
Hide resolved
src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheck.java
Outdated
Show resolved
Hide resolved
From issue: https://github.com/checkstyle/checkstyle/pull/13932/files#r1368105661 Property was 3.2 check above didn't specify It did extend But it did in 3.4 . |
@romani Sir can you please review the changes and please provide me some enhancements if required. |
@Rohanraj123 You have not resolved all my review items yet. |
@Rohanraj123 , please redirect all questions to @rnveach , he is first reviewer for this PR. |
@rnveach Sir, can you please one more time define the doables so that i can keep them in mind while making the changes. Would be helpful for my learning as well. |
@Rohanraj123 Where is the confusion with the information you were given at #13934 (comment) and my review items at #13945 (comment) , #13945 (comment) , and #13945 (comment) . |
@Rohanraj123
With it gone, it will re-generate the XML files with the correct versions. I recommend to start with a clean master first. |
Sure sir Let me do the changes |
@rnveach Sir, removing the line of code you were reffering giving error : ```
|
Update the PR. I would need to see what is being done and the full stack trace. |
@Rohanraj123 The exception being generated does not provide us information besides its failing to read a since version in a file. We need more information. I recommend start debugging and see why it is failing. Add a second commit titled something like Add the following to the commit:
This will ensure we see the file causing the issue. I picked this spot from looking at the stack trace. In addition, fix up your first commit to remove the unnecessary changes. Keep as clean as you can (meaning similar to the original code). |
Okay sir let me do the changes |
@rnveach Sir, I have added the catch check in XdocGenerator file. And squash them in one commit. When i tried to run mvn clean verify , It says that Exception arrives in src\xdocs\checks\whitespace\filetabcharacter.xml.template . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok to merge
@Rohanraj123 No worries. You have some time. I am looking into the issue a bit more to understand things. @romani CI is failing, so is too soon to say it is ready for merging. |
I was digging through the error and I think I understand the logic of why the code we removed is there. We can actually see this for 2 of the overrides we did for checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/site/SiteUtil.java Lines 165 to 166 in 1282fe6
And I think that's where the solution lies, we need to add these properties to this global override field. So I would expect us to add a few Ideally, we could remove the need for this list if we did version comparing between the version the module was introduced versus the version the inherited property was introduced and taking the newest of the 2. We are tracking inherited properties directly through Edit: We would still need the override to fall back on if we changed extension of the module after it was introduced, like changing AbstractCheck to AbstractJavadocCheck. We have a few modules we are looking to do that to still. Only way to avoid the override is if we put a |
@Rohanraj123, if you think that this PR becomes a bit complicated to finish. |
Sure @rnveach Sir , letme add .fileextensions first. Then we will discuss furthur |
ci failure:
|
I fixed this CI failure @romani Sir. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be final change
else if (SUPER_CLASS_PROPERTIES_JAVADOCS.containsKey(propertyName) | ||
|| TOKENS.equals(propertyName) | ||
|| JAVADOC_TOKENS.equals(propertyName)) { | ||
else if (TOKENS.equals(propertyName) || JAVADOC_TOKENS.equals(propertyName)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else if (TOKENS.equals(propertyName) || JAVADOC_TOKENS.equals(propertyName)) { | |
else if (TOKENS.equals(propertyName) | |
|| JAVADOC_TOKENS.equals(propertyName)) { |
restore original lining and indentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure sir
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rnveach Even After making these changes it is not updating sinceVersion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Rohanraj123 , restore formatting only
else if (TOKENS.equals(propertyName)
|| JAVADOC_TOKENS.equals(propertyName)) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even After making these changes it is not updating sinceVersion.
What do you mean?
It was updated at https://github.com/checkstyle/checkstyle/pull/13945/files#diff-eaff5fa3cb101145757a2bd9ebe2e805e8fd8057ae27f9e21ef91900cb7938cc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay got it thanks !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Rohanraj123 , restore formatting only
else if (TOKENS.equals(propertyName) || JAVADOC_TOKENS.equals(propertyName)) {
did it ! @romani Sir
related #13934