-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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 #11551
Add editorconfig #11551
Conversation
Deploy preview for kubernetes-io-master-staging ready! Built with commit 7ee13af https://deploy-preview-11551--kubernetes-io-master-staging.netlify.com |
@chenrui333 👋 Thanks for this--I know you got some recent feedback about configuring your editor to avoid changing unrelated whitespace. I'm still not sure whether the problem this PR addresses is sufficiently pervasive to require repo-level enforcement, or that this change will solve more problems than it creates. @lucperkins @Bradamant3 @kbhawkey Any feedback? |
yeah, my past experience is good since it would reduce the noise for non-modified lines (mostly for coding lines). I would imagine we probably need one time cleanup (to conform with the coding style enforced by the rules in editorconfig) if we agree to have this config file, but it would definitely beneficial in the long run. And also editorconfig is very generic config file, it has been widely supported across the editors. Hope this helps! |
I just found another use case that we might benefit with doing the localization PR review. |
I absolutely consider editorconfigs to be a best practice. They don’t force anything on people that use editors that don’t support them, and they make standards enforcement effortless for those who do. I currently have a PR open to fix a problem where some Sass files were indented using spaces and others using tabs, which would have been avoided from the get-go with a proper editorconfig. |
Assigning @zacharysarah since he is already engaged on this |
@chenrui333, I have not used .editorconfig. Is this correct, https://github.com/editorconfig? |
@kbhawkey Sure, I will try to answer your question one by one.
Not every editor needs the plugin to apply the coding style implicitly. Check out this link, https://editorconfig.org/#download.
It would be something like this tool, https://github.com/jedmao/eclint. I can actually take a look on that. |
@kbhawkey This is the PR trying to use If we want to enforce in the CI/CD build, here is the script:
|
After some thought, I am not sure about a script to enforce the .editorconfig rules. |
yeah, the idea to have the editorconfig is just to remove the noise from the PR review (the irrelevant changes) and facilitate a better PR review experience. |
Thanks for your patience, @chenrui333! /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zacharysarah The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@zacharysarah thanks a lot for your approval. After this, it is going to bring lots of changes (probably undesired from contributors). It would be very good discussion topic in the sig-docs meeting. |
relates to #11551