Comments (6)
Files should not be re-written when unchanged (matches expected formatting),
especially when the cache file is present.
The issue I see is that the cache file is stored inside the target directory
and this cannot be changed with the current config.
If you are running a "clean install" each time, then this will happen.
If the cache file were configurable, it could be moved outside target, ignored
in source control, and avoid unnecessary formatting/comparing.
If this is for accessing stats, the files are read every time.
This could be avoided by following the file changes as well and avoiding the
read (still depending on the above cache file always being present outside
target).
Original comment by [email protected]
on 11 Oct 2012 at 2:09
from formatter-maven-plugin.
Is this something only seen on non windows systems? I always run clean install and I've never seen this occur in windows.
from formatter-maven-plugin.
This is so old. Let's close it for now. If it re-occurs, we can address it later.
from formatter-maven-plugin.
Just a small heads up:
The issue is present when you use core.autocrlf input
I believe.
At least, I'm on Windows, and rather work with what's in the repository than with CRLF, so you can see earlier when people haven't set up their git correctly.
But if git has checked out one line ending style and watches that format, and the plugin then writes out CRLF, git sees that the file has changed.
It's not that big of a deal, since you can solve it by using core.autocrlf true
.
from formatter-maven-plugin.
We do expect auto true. And eventually will turn on a ci hook that will prevent code making it in with improper line endings. At least on the travis / appvoyer builds by making them fail.
Get Outlook for Androidhttps://aka.ms/ghei36
On Sun, Sep 11, 2016 at 5:22 AM -0400, "Ruben Dijkstra" <[email protected]mailto:[email protected]> wrote:
Just a small heads up:
The issue is present when you use core.autocrlf input I believe.
At least, I'm on Windows, and rather work with what's in the repository than with CRLF, so you can see earlier when people haven't set up their git correctly.
But if git has checked out one line ending style and watches that format, and the plugin then writes out CRLF, git sees that the file has changed.
It's not that big of a deal, since you can solve it by using core.autocrlf true.
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/19#issuecomment-246170647, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AA7howaWCCDVuPnt7LRiaIbVxDIR7T3yks5qo8hggaJpZM4EVozi.
from formatter-maven-plugin.
Let me clarify a bit in case the question was about usage not working in our code base.
- Working in our codebase.
* We use git attributes to control line endings.
* Eclipse egit doesn't support git attributes.
* The settings used are highly typical of git projects on github.
* Users can locally use whatever they want to build but if they commit with egit, it will cause problems if they did not setup their git properly with core.autocrlf true.
* We can control / prevent introduction of wrong line endings on entirely new files by using our ci prevention. For existing files it's pretty easy to see on the diff that someone didn't have git setup correctly.
- If working on your own code base using this plugin.
* If you do not use 'auto' due to egit usage, then modify the parameters to run the plugin.
/**
* Sets the line-ending of files after formatting. Valid values are:
* <ul>
* <li><b>"AUTO"</b> - Use line endings of current system</li>
* <li><b>"KEEP"</b> - Preserve line endings of files, default to AUTO if
* ambiguous</li>
* <li><b>"LF"</b> - Use Unix and Mac style line endings</li>
* <li><b>"CRLF"</b> - Use DOS and Windows style line endings</li>
* <li><b>"CR"</b> - Use early Mac style line endings</li>
* </ul>
*
* @since 0.2.0
*/
@Parameter(defaultValue = "AUTO", property = "lineending", required = true)
private LineEnding lineEnding;
from formatter-maven-plugin.
Related Issues (20)
- Drop dependabot in favor of Renovate HOT 3
- Mockito WHEN Bug in Eclipse formatting jdt core 3.32.0 and 3.33.0 HOT 3
- Large whitespace in debug output HOT 9
- Bad format of sealed interfaces extending other interfaces HOT 9
- Option to fail to process invalid setting id HOT 2
- New Configuration hashing into file hash breaks existing caching - only confirmed with XML at the moment HOT 2
- NOTICE: Eclipse 2023-06 Requires jdk 17 for many parts HOT 7
- Eclipse Formatter Attribute Ignored: Parameter After Annotation HOT 1
- Sealed interfaces are not correctly formatted HOT 3
- Not able to run validate due to ExtensionRegistry return null value HOT 4
- False configuration used for line Indentation HOT 2
- lineEnding=KEEP breaks JSON validation on Windows HOT 6
- Report problematic line number in error message HOT 3
- Tab treated as one space for the purpose of line length HOT 3
- Includes are not honored by includeResources
- Rewrite the cache store to match that done on impsort HOT 1
- Please use change log or github releases
- Support 'windows' users for contributions
- No documentation for 'find-transitive-eclipse-updates.sh' and it does not work on windows without additional software
- Next Release: placeholder to prevent release HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from formatter-maven-plugin.