Spotless Maven plugin changes line endings unexpectedly #2572
Replies: 1 comment
-
| yes, with the PRESERVE mode: https://github.com/diffplug/spotless/tree/main/plugin-maven#line-endings-and-encodings-invisible-stuff | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using the spotless-maven-plugin version 2.46.1 with an Eclipse formatter configuration (code_style.xml) like this:
Spotless is modifying line endings on some files when I run mvn spotless:apply.
This causes changes in files that have not been otherwise edited, making Git diffs noisy and leading to potential merge issues.
I would like Spotless to preserve the current line endings as they are in the repository and avoid rewriting files unnecessarily.
Is there a way to make Spotless respect existing line endings?
Beta Was this translation helpful? Give feedback.
All reactions