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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

fowl2
Copy link

@fowl2 fowl2 commented Feb 29, 2024

This file will automatically configure supported code editors with the correct line endings and tab size as per CODESTYLE.

max_line_length seems less supported, but it looks like eg. VS Code might support it one day -microsoft/vscode#111251

See https://editorconfig.org/ for reference.

@dfandrich
Copy link
Contributor

dfandrich commented Feb 29, 2024 via email

@fowl2
Copy link
Author

fowl2 commented Feb 29, 2024

I think the world has pretty much coalesced around just this one 😅

@dfandrich
Copy link
Contributor

It's an interesting proposal, with what looks like pretty wide support that solves the scaling issue I referred to. A few additions that are valid for curl:

  • charset = utf-8
  • spelling_language = en-US
    The above should be valid everywhere except in a couple of tests/data/test* files that don't always conform (by design). Those files should probably be left at their default settings for these options to avoid erroneous conversion:
  • charset, end_of_line, trim_trailing_whitespace, max_line_length, spelling_language
    Also, I'd add a comment linking to https://editorconfig.org/ to help people wondering about the file

@dfandrich
Copy link
Contributor

Also, it needs a REUSE comment.

@github-actions github-actions bot added the tests label Mar 4, 2024
@fowl2
Copy link
Author

fowl2 commented Mar 4, 2024

@dfandrich I think I've addressed your feedback, except I'm not sure what "REUSE comment" is

@bagder
Copy link
Member

bagder commented Mar 4, 2024

I'm not sure what "REUSE comment" is

Every file needs a copyright line and a license identifier. Maybe .gitconfig for example can serve as an example. See the top comments in that file.

@fowl2
Copy link
Author

fowl2 commented Mar 4, 2024

Ahh, of course. Done.

@bagder
Copy link
Member

bagder commented Mar 4, 2024

The pytest CI failures are fixed in #13037

# 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants