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

Basic editor config to avoid some whitespace issues #6534

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

mitchcapper
Copy link
Contributor

to take care of those pesky people who use tabs as tab stops.

@wolfSSL-Bot
Copy link

Can one of the admins verify this patch?

@dgarske
Copy link
Contributor

dgarske commented Jun 22, 2023

Hi @mitchcapper , thank you for being an approved contributor. Can you tell use more about this (https://editorconfig.org) and how it can be used/tested? If we are going to include this in our repo we'll need some help understanding it.

Thanks,
David Garske, wolfSSL

@dgarske dgarske self-assigned this Jun 22, 2023
@mitchcapper
Copy link
Contributor Author

Well the website may do that best but editorconfig has been around for a good while. Visual studio added support in VS 2017 and several other editors supported it long before that. At this point virtually all editors support it ( https://editorconfig.org/#pre-installed )

It is a fairly standardized way of setting format specifications to be enforced by the code editor. Generally the settings in editorconfig will override any user preferences in most editors. This means if I use tabs for tab but open a project that has an editorconfig that uses spaces and 2 spaces per tab it will override my preferences for that project.

Most editors allow you to setup pretty advanced editorconfig settings through custom prefixed extensions (almost all VS code settings can be set this way, you can even export them to an editorconfig from within VS).

This however just sets some minimal standard preferences it seems this project has. Editor config settings are hierarchical and can be specified per file type as well. Using the root=true means editorconfig files above the project root are not searched.

Helps fix some common formatting / linting issues users may cause without them having to do anything. Many projects have editorconfig files ie:

As for testing set your settings to something different than what is in the file, open up a file that has that editorconfig in its directory or higher and its settings should override.

@dgarske
Copy link
Contributor

dgarske commented Jun 23, 2023

Okay to test

Copy link
Contributor

@dgarske dgarske left a comment

Choose a reason for hiding this comment

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

Thank you! I like it. Contributor agreement on file

@dgarske dgarske merged commit 033f56b into wolfSSL:master Jun 23, 2023
64 checks passed
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.

3 participants