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

Enhancement: a goal to force change all tracked files. Currently lineEnding configuration doesn't change any line-endings if file was not edited #281

Open
Zacorich opened this issue Jun 2, 2018 · 2 comments

Comments

@Zacorich
Copy link

Zacorich commented Jun 2, 2018

Plugin version: 2.7.3
Effect: Tried to change from CRLF to LF, but only some files gets changed or none. Very unpredictable.
Expected Behaviour: When I change lineEnding configuration to LF and run formatter all files included
must change to LF line-Endings.

@Zacorich
Copy link
Author

Zacorich commented Jun 2, 2018

net.revelc.code.formatter.FormatterMojo : 499 ; compares cachedHash with originalHash and if no changes in actual file is made no lineEnding will be changed. But would be great for lineEnding to change when we change it in configuration meaning forcing lineEnding change by some configuration switch. This feature will be useful for whole project files lineEndings correction.

Zacorich added a commit to sombrero-network/omega that referenced this issue Jun 2, 2018
…ovider-i-want-to-validate-my-hardware-to-be-listed-in-my-provided-resources-table

+ Create a progress bar below the table that will show summary progress of resources downloading, starting,validation, suspension

issue solved: https://trello.com/c/YwN6iE8N/25-project-maven-unified-formatter-is-not-formatting-project-lineending-as-expected
+ maven formatter set to set line separators to LF; Used eclipse to
convert all line endings to LF so our public repo contains only LF line
endings; forced git to use LF on windows; forced intellij to use LF on windows;
https://stackoverflow.com/questions/1967370/git-replacing-lf-with-crlf;
maven formatter currently don't support forcing all project files
lineEnding change: revelc/formatter-maven-plugin#281
+added project code formatting requirement to README

Issue solved: resource folder intellij setting overwritten by maven;
moved resource folder to root of the project and configured resource in
maven
@Zacorich Zacorich changed the title lineEnding configuration doesn't change any line-endings Enhanchement: a goal to change all tracked files as currently lineEnding configuration doesn't change any line-endings if file was not edited Jun 3, 2018
@Zacorich Zacorich changed the title Enhanchement: a goal to change all tracked files as currently lineEnding configuration doesn't change any line-endings if file was not edited Enhanchement: a goal to change all tracked files. Currently lineEnding configuration doesn't change any line-endings if file was not edited Jun 3, 2018
@Zacorich Zacorich changed the title Enhanchement: a goal to change all tracked files. Currently lineEnding configuration doesn't change any line-endings if file was not edited Enhancement: a goal to change all tracked files. Currently lineEnding configuration doesn't change any line-endings if file was not edited Jun 3, 2018
@Zacorich Zacorich changed the title Enhancement: a goal to change all tracked files. Currently lineEnding configuration doesn't change any line-endings if file was not edited Enhancement: a goal to force change all tracked files. Currently lineEnding configuration doesn't change any line-endings if file was not edited Jun 3, 2018
@ctubbsii
Copy link
Member

I've been looking at this, trying to figure out why line endings aren't being changed. It seems like they are already supposed to change if you change the config. Do you have an example project (a simple mock project) to replicate the issue?

The only thing I can think of is that there might be an issue with our automatic line ending detection code, if there is a mixture of line endings in a single file. Maybe that's what's going on?

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

No branches or pull requests

2 participants