Skip to content

Commit 6ad665f

Browse files
committed
Add editorconfig to help OSS contributors
When switching between many different open source code bases, it can be cumbersome to constantly change editor settings in order to respect a given project's basic style preferences. EditorConfig is a popular format for representing those preferences so editors can automatically respect them. Many editors support EditorConfig out of the box, and many others have EditorConfig plugins: https://editorconfig.org/#pre-installed This commit adds an EditorConfig to the ModSecurity project. It is most likely not perfect because the chosen indentation varies a bit throughout the project, but hopefully it provides a good basis for most ModSecurity editing.
1 parent 1078a7c commit 6ad665f

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.editorconfig

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
# Unix-style newlines with a newline ending every file
5+
[*]
6+
end_of_line = lf
7+
indent_style = space
8+
# Scripts without suffixes in the project root tend to indent by two spaces
9+
indent_size = 2
10+
11+
# Most of the project files indent by four spaces
12+
[*/**]
13+
indent_size = 4
14+
15+
# Test files indent by two spaces
16+
[test/**]
17+
indent_size = 2
18+
19+
# The config parser file indents by both two and four spaces,
20+
# so we choose to indent by two spaces as a common denominator.
21+
[*.yy]
22+
indent_size = 2
23+
24+
[{Makefile,Makefile.am}]
25+
indent_style = tab
26+

0 commit comments

Comments
 (0)