-
-
Notifications
You must be signed in to change notification settings - Fork 470
Closed
Labels
conclusion: resolvedIssue was resolvedIssue was resolvedtopic: codeRelated to content of the project itselfRelated to content of the project itselftype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project
Description
Describe the problem
The autoformat feature removes the last line's new-line, disturbs all sorts of diff / git tools.
Quoting the C++ standard: A source file that is not empty and that does not end in a new-line character, or that ends in a splice, shall be processed as if an additional new-line character were appended to the file.
Could this be changed to leave the new-line in place, or maybe even add one if it is missing?
Thanks!
To reproduce
Press CMD-T and save. Look at the last character in the sketch file.
Expected behavior
Leave the new-line before EOF in place.
Arduino IDE version
2.0-nightly-202209
Operating system
macOS
Operating system version
12.6
Additional context
No response
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest nightly build
- My report contains all necessary details
per1234
Metadata
Metadata
Assignees
Labels
conclusion: resolvedIssue was resolvedIssue was resolvedtopic: codeRelated to content of the project itselfRelated to content of the project itselftype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project