Skip to content
/ linux Public
forked from torvalds/linux

Commit

Permalink
.editorconfig: remove trim_trailing_whitespace option
Browse files Browse the repository at this point in the history
Some editors (like the vim variants), when seeing "trim_whitespace"
decide to do just that for all of the whitespace in the file you are
saving, even if it is not on a line that you have modified.  This plays
havoc with diffs and is NOT something that should be intended.

As the "only trim whitespace on modified lines" is not part of the
editorconfig standard yet, just delete these lines from the
.editorconfig file so that we don't end up with diffs that are
automatically rejected by maintainers for containing things they
shouldn't.

Cc: Danny Lin <[email protected]>
Cc: Íñigo Huguet <[email protected]>
Cc: Mickaël Salaün <[email protected]>
Cc: Masahiro Yamada <[email protected]>
Fixes: 5a602de ("Add .editorconfig file for basic formatting")
Acked-by: Vincent Mailhol <[email protected]>
Link: https://lore.kernel.org/r/2024061137-jawless-dipped-e789@gregkh
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh committed Jun 13, 2024
1 parent 8f40af3 commit 7da9dfd
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ root = true
[{*.{awk,c,dts,dtsi,dtso,h,mk,s,S},Kconfig,Makefile,Makefile.*}]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = 8

[*.{json,py,rs}]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4
Expand All @@ -26,7 +24,6 @@ indent_size = 8
[*.yaml]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = unset
insert_final_newline = true
indent_style = space
indent_size = 2

0 comments on commit 7da9dfd

Please sign in to comment.