Skip to content

Commit 9d7a863

Browse files
committed
Add .editorconfig file for correct indentation
* Most editors respect `.editorconfig` settings. * For those that don't out of the box plugins are readily available for all major editors at https://editorconfig.org/#download
1 parent c6b8119 commit 9d7a863

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.editorconfig

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# EditorConfig file. For more info, please see:
2+
# https://EditorConfig.org
3+
4+
# top-most EditorConfig file
5+
root = true
6+
7+
# All files should have a final newline and not have trailing whitespace
8+
# but we need to explicitly enumerate files we care about to prevent random junk
9+
# from being linted
10+
11+
[*.{f90,F90}]
12+
indent_style = space
13+
indent_size = 2
14+
trim_trailing_whitespace = true
15+
max_line_length = 132
16+
insert_final_newline = true
17+
18+
[{CMakeLists.txt, *.cmake}]
19+
indent_style = space
20+
indent_size = 2
21+
trim_trailing_whitespace = true
22+
max_line_length = 132
23+
insert_final_newline = true
24+
25+
[*.md]
26+
max_line_length = off
27+
trim_trailing_whitespace = false
28+
charset = utf-8
29+
insert_final_newline = true
30+
31+
# Tab indentation (no size specified)
32+
[Makefile]
33+
indent_style = tab
34+
indent_size = 4
35+
trim_trailing_whitespace = true
36+
max_line_length = 132
37+
insert_final_newline = true
38+
39+
[*.sh]
40+
indent_style = space
41+
indent_size = 2
42+
trim_trailing_whitespace = true
43+
max_line_length = 132
44+
insert_final_newline = true
45+
46+
[*.nml]
47+
trim_trailing_whitespace = true
48+
max_line_length = 132
49+
insert_final_newline = true
50+
51+
[*.{yml,json}]
52+
indent_style = space
53+
indent_size = 2
54+
trim_trailing_whitespace = true
55+
insert_final_newline = true

0 commit comments

Comments
 (0)