-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: add editorconfig #3
feat: add editorconfig #3
Conversation
|
||
[*] | ||
indent_size = 4 | ||
indent_style = space |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For .go
Indentation
We use tabs for indentation and gofmt emits them by default. Use spaces only if you must.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not leave .go files out of editorconfig and do something like
openshift/oadp-operator#1337
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did not understand the linked PR
but yes, go files and Makefile both accept tabs and spaces (go example of spaces: the headers copyright), so added them to list of indent_style=unset
. go fmt
(run by golangci-lint) will take care of this for us in go files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tab character is a very important part of the syntax of Makefiles.
So Makefile should not be indented using spaces. Yes unset sounds good.
Spaces can exists in go and makefile but not as an indent method for non-comments.
Signed-off-by: Mateus Oliveira <[email protected]>
Signed-off-by: Mateus Oliveira <[email protected]>
6fcfede
to
46d41c0
Compare
Description
Add editorconfig to project. This will check all project's file format, by checking:
How to test
Run
make ec