Files being changed even when all rules are met and no changes are made
See original GitHub issueSteps to reproduce
Editor config:
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
Versions:
EditorConfig extension: 0.3.4
VSCode: 1.8.1
Steps:
- Open a file
- Being asked to save
Expected Behavior
Should not be asked to save.
Actual Behavior
The file is being asked to save.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Check out, check in, or discard changes to files in a ...
By discarding the checkout, you can avoid making new versions when you haven't made any changes to the file. Go to the library...
Read more >Rule 5. Serving and Filing Pleadings and Other Papers
Any paper after the complaint that is required to be served—must be filed no ... Changes Made After Publication and Comments Rule 5(b)(2)(D)...
Read more >National Industrial Security Program Operating Manual
This rule provides that a contractor must implement changes no later than 6 months from the date of a published change to this...
Read more >faq-providers-no-surprises-rules-april-2022.pdf - CMS
I want more information on provider and facility requirements. Are there any exceptions? Requirement: No balance billing for out-of-network ...
Read more >Driver Services - TN.gov
The law does not require the address to be changed on your actual license, ... Mail-In Change-of-address forms are also available at any...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kowsheek some Windows Git distributions (e.g., GitHub for Windows) configure your system to automatically convert line endings from
LF
toCRLF
when files are checked out. This line-ending conversion is controlled by a Git configuration flag:autocrlf
.There is some controversy regarding the best value for
autocrlf
; however, havingCRLF
line endings will cause issues like the one you’ve just experienced. As such, I recommend configuring your repositories such that they never convert line endings.To disable automatic line-ending conversion, you should visit each of your repositories and execute the following commands:
The first command tells Git to never change line endings (in the future). Next, we refresh each repository by removing every file from Git’s index and, finally, rewriting the Git index to pick up all the new line endings. This fixes the CRLFs that were introduced to your local file system when you cloned each repository.
Now, you can work in LF mode via EditorConfig and never introduce rogue CRLFs into your files.
You can also run
git config core.autocrlf false --system
to change the system-wide setting, which is actually what I do on Windows so I don’t have to deal with this on a regular basis.I didn’t need to remove
.gitattributes
which I use in my repo to specify binaries such as favicons. I did the global and local setting changes to get it rolling.