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

Add .editorconfig file #135

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

mvoitko
Copy link

@mvoitko mvoitko commented Mar 16, 2022

Signed-off-by: Maksym Voitko [email protected]

Which issue is resolved by this Pull Request:
Resolves #

Description of your changes:

Testing:

  • Unit tests pass
  • e2e tests pass
  • Details about new tests (If this PR adds a new feature)
  • Details about any manual tests performed

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Signed-off-by: Maksym Voitko <[email protected]>
Signed-off-by: Maksym Voitko <[email protected]>
@mvoitko
Copy link
Author

mvoitko commented Mar 22, 2022

@surajkota Could you please review?

Copy link
Contributor

@surajkota surajkota left a comment

Choose a reason for hiding this comment

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

This looks cool! Thanks for the contribution. Few questions

do IDEs (once plugin is installed) format code instead of devs having to run black and go fmt commands?


[*.{py,rst,ini}]
indent_style = space
indent_size = 4
Copy link
Contributor

Choose a reason for hiding this comment

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

why 4 for py, go and go but 2 for yaml/json? could you please add links to any official styling guidelines you followed?

Copy link
Author

Choose a reason for hiding this comment

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

For py it's pep-8.
For yaml and json, it's just a matter of taste. It seems more concise for me.

Copy link
Author

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

Any updates? @surajkota

@mvoitko
Copy link
Author

mvoitko commented Mar 24, 2022

This looks cool! Thanks for the contribution. Few questions

do IDEs (once plugin is installed) format code instead of devs having to run black and go fmt commands?

The IDE will do the formatting specified in the .editorconfig file, but as you can see the config are very light: EOF, and indentation.
And I guess it's good. I am not a fan of code formatting tools.

@mvoitko mvoitko requested a review from surajkota March 24, 2022 22:42
@surajkota
Copy link
Contributor

I have not got a chance to try this out. Basically need to make sure these setting match the existing formatting tools we use black for python and go fmt for go

I think yaml is 2 spaces, not sure about md files but those should just reder properly on the website

@mvoitko
Copy link
Author

mvoitko commented Jun 29, 2022

@surajkota any chance it could be merged?

@surajkota
Copy link
Contributor

@akartsky can you check if the configuration matches the styling in repo by installing it? We dont want the configuration to change all the files unless they have not been formatted correctly

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.

2 participants