Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,27 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space

[*.gradle]
indent_size = 2

[*.groovy]
indent_size = 4

[*.bat]
[*.java]
indent_size = 4

[*.json]
indent_size = 2

[*.gradle]
[*.py]
indent_size = 2

[*.sh]
indent_size = 2

[*.{yml,yaml}]
indent_size = 2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means xml and html also use 2 space indent. I do not have the full overview of file types, but looks like intellij primarily uses 2 space indent for json, yaml and properties and thus 4 space for the rest. However, asciidoc and sql also seems to be using 2 space indent?

I am not really sure how to proceed without carefully considering each file type that we have. For now, I suggest to specify all the known files explicitly and leave out the default size (though I see the point in eventually including that). Could also keep default indent at 4 (but I think a default of 2 is more appropriate in the end?).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reflecting a bit more on this, I think just including xml and html with indent_size 4 into this PR can work out. We should then be prepared to adjust any additional file types too, but hopefully we have then hit most types correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're right, I've pushed another change.


[*.{xsd,xml}]
indent_size = 4