Git Product home page Git Product logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 24, 2024
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.

hazendaz avatar hazendaz commented on May 24, 2024

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.

ctubbsii avatar ctubbsii commented on May 24, 2024

This is so old. Let's close it for now. If it re-occurs, we can address it later.

from formatter-maven-plugin.

Shredder121 avatar Shredder121 commented on May 24, 2024

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.

hazendaz avatar hazendaz commented on May 24, 2024

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.

hazendaz avatar hazendaz commented on May 24, 2024

Let me clarify a bit in case the question was about usage not working in our code base.

  1. 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.
  1. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.