aboutsummaryrefslogtreecommitdiffstats
path: root/.editorconfig
diff options
context:
space:
mode:
authorGraham Christensen <[email protected]>2020-01-27 16:32:52 -0500
committerBrian Behlendorf <[email protected]>2020-01-27 13:32:52 -0800
commit25df8fb42ffa62e4ad3855a8cd4660eeedc80e1f (patch)
treee0380d8e01ca627cd45096d3464014e41c819108 /.editorconfig
parente4c439021f09352ee757cb508fda061586f4664b (diff)
Add an .editorconfig; document git whitespace settings
Most of the projects I work on don't use tabs, and while authoring my first patch I had to wrestle with my editor to not introduce whitespace editors. The `.editorconfig` file is supported by a large number of editors out of the box, and many more with plugins. As a first-time contributor, I can't say for certain these settings are totally correct, but thus far git and my editor are satisfied enough. I considered adding `git config --local format.signOff true` but wanted to respect the warning: format.signOff A boolean value which lets you enable the -s/--signoff option of format-patch by default. Note: Adding the Signed-off-by: line to a patch should be a conscious act and means that you certify you have the rights to submit this work under the same open source license. Please see the SubmittingPatches document for further discussion. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Graham Christensen <[email protected]> Closes #9892
Diffstat (limited to '.editorconfig')
-rw-r--r--.editorconfig10
1 files changed, 10 insertions, 0 deletions
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000..0f4b96a83
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,10 @@
+root = true
+
+[*]
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.{c,h}]
+tab_width = 8
+indent_style = tab