Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editorconfig: line ending and indentation settings #13012

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 22 additions & 0 deletions .editorconfig
@@ -0,0 +1,22 @@
# Copyright (C) James May, <[email protected]>, et al.
# SPDX-License-Identifier: curl

# EditorConfig: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
Copy link
Member

Choose a reason for hiding this comment

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

This section contradicts .gitattributes which lists several extensions that use crlf.

Maybe using [*.md] here would be safer?

charset = utf-8
spelling_language = en-US

# Unix-style newlines
end_of_line = lf

insert_final_newline = true
trim_trailing_whitespace = true

[*.{c,h}]
indent_style = space
indent_size = 2
max_line_length = 79
8 changes: 8 additions & 0 deletions tests/data/.editorconfig
@@ -0,0 +1,8 @@
# Copyright (C) James May, <[email protected]>, et al.
# SPDX-License-Identifier: curl

# EditorConfig: https://EditorConfig.org

# set as top-most EditorConfig with no configuration file
# to help prevent erroneous reformatting of test data
root = true