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
[MCHECKSTYLE-376] Remove window line endings from files #16
base: master
Are you sure you want to change the base?
Conversation
So this is your fix for MCHECKSTYLE-376. I was fixing only that java file here but your approach is perhaps better, so I approve it |
So your are changing all to LF ? Honestly I don't know if we have a rule for line endings. I am fine with LF only |
Will Windows users (developers of the plugin I mean) be happy with this change? Or is it better to have CRLF every where? |
Windows users should be fine thanks to Git autocrlf. |
I have amended the commit message and force pushed to Let's see CI |
@eolivelli
I just recommend documenting this somewhere so it is clear that it is required for windows users. As this PR demonstrates, there are no checks to ensure future files remain with 1 line ending. |
I wouldn’t say it was required. Unless people are opening source files in Notepad, it should be fine. Modern IDEs and text editors work fine with unix line endings on Windows. |
Not all ITs use the same rules.
|
I don't like very much the groovy script that rewrites a source file. I think the original issue of "MCHECKSTYLE-54 checkstyle:check does not see provided scope dependencies" has nothing to do with EOL. @rnveach what about adding in this commit a fix for Mcheckstyle54.java ? |
@eolivelli |
@Tibor17 which fix in checkstyle? |
@eolivelli |
@Tibor17 I see. |
Yes, it isn't a problem with working an existing file as long as the IDE keeps the same line encoding. When creating a new file in the project and crlf turned off, my Eclipse Oxygen created the file with |
While looking at https://issues.apache.org/jira/browse/MCHECKSTYLE-54 it appears the issue was originally with |
157c1e7
to
799faa1
Compare
Done and added the issue number to the commit message. Just as a note, this patches the issue to pass it, but it doesn't fix it. Somewhere in your process, the files are not in the system's default line endings and it could present an issue in the future in some way, like if you need to add an IT specifically about the new lines. |
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.
Very good.
Let me do the bureaucratic part (push to ASF repo and wait for CI)
we will soon have the repository back in great shape, ready for new enhancements.
Thanks
<!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.2//EN" "https://checkstyle.org/dtds/configuration_1_2.dtd"> | ||
<module name="Checker"> | ||
<module name="TreeWalker"> | ||
<module name="JavadocMethod"/> |
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.
Perfect
@rnveach I have pushed again this branch to ASF repo Waiting for CI, then I am merging this one We can create an issue for the upgrade to latest checkstyle |
@rnveach it seems that we have a couple of failures, see https://builds.apache.org/job/maven-box/job/maven-checkstyle-plugin/job/MCHECKSTYLE-376/3/console can you help me investigate ? |
The build is failing on every windows machine. |
@eolivelli |
These are the files I changed in this PR so this is the same issue related to MCHECKSTYLE-54. I would have to look into these issues to see what I can change the configurations to. |
I am running After I changed version Checkstyle 8.19 to 8.21 there are other two faled ITs:
|
@rnveach do you have any idea ? May I send the path or can you do it @rnveach ? |
I'm sorry I forgot I was suppose to do something here. |
@rnveach please go ahead. Currently maven checkstyle plugin is working very well and users are able to switch to new checkstyle and you (checkstyle maintainers) are able to move forward and drop legacy stuff. I appreciate very much your effort, I don't have much time during these days |
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
invoker.goals = verify | ||
invoker.debug = true |
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.
I think you removed the newline at the end of this file.
mvn verify
andmvn -Prun-its clean verify
passed.Found these doing
find . -type f -name '*.*' -exec dos2unix '{}' +
on linux.