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

code: add more style options in .editorconfig #22920

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

flyingthingsintothings
Copy link
Contributor

Solved Problem

Some file types were missing from the global .editorconfig.

Solution

  • Added more EditorConfig style settings to the .editorconfig to support YAML, Kconfig and CMakeLists.txt files.

Changelog Entry

/

Alternatives

/

Test coverage

/

Context

I wanted to see whether a .editorconfig would be accepted before adding all the options. This will also be an ongoing effort as that's easier than adding all the options for all the files at once. People can add files that aren't displayed/edited correctly as they need it.

The options are decided both by looking at the developer documentation as well as by checking what most files use (e.g. for YAML where the style isn't documented anywhere).

@flyingthingsintothings
Copy link
Contributor Author

The only option I'm not that sure about is Kconfig. The indentation there seems to vary from file to file. I tried to use what applies to most files.

@dagar
Copy link
Member

dagar commented Mar 25, 2024

The only option I'm not that sure about is Kconfig. The indentation there seems to vary from file to file. I tried to use what applies to most files.

Probably because there's no tooling enforcing it.

@dagar dagar merged commit bcbae86 into PX4:main Mar 25, 2024
88 of 89 checks passed
@flyingthingsintothings flyingthingsintothings deleted the pr-editorconfig-additions branch March 25, 2024 13:56
@flyingthingsintothings
Copy link
Contributor Author

Just thought that maybe there was a project preference, but I guess a consistent style will already help a lot, whether it's 4 or 8 spaces or tabs 😄

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

Successfully merging this pull request may close these issues.

None yet

2 participants