Skip to content

Commit

Permalink
enforce final newlines and trim trailing whitespace
Browse files Browse the repository at this point in the history
- Having trailing newlines makes diffs more readable when files are extended with more lines. Otherwise it creates unnecessary diffs which look like 2 lines have been modified (the last line and the new content).

- It's already being enforced by most code linters such as Ruff anyway, so our EditorConfig went against our linter.

- We should also enforce trimming of any trailing whitespace fluff at the end of lines.
  • Loading branch information
Arcitec committed Oct 2, 2024
1 parent aed66ae commit a7b4bf9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = false
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120
tab_width = 4
ij_continuation_indent_size = 8
Expand Down

0 comments on commit a7b4bf9

Please sign in to comment.