The Wayback Machine - https://web.archive.org/web/20220108040932/https://github.com/Kong/kong/pull/2670
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

chore(conf): add .editorconfig #2670

Merged
merged 1 commit into from Oct 26, 2017
Merged

chore(conf): add .editorconfig #2670

merged 1 commit into from Oct 26, 2017

Conversation

@bungle
Copy link
Member

@bungle bungle commented Jul 5, 2017

Summary

Add .editorconfig

@p0pr0ck5
Copy link
Contributor

@p0pr0ck5 p0pr0ck5 commented Jul 5, 2017

There are a few files that use four spaces for indentation, such as the nginx templates and fixtures template. Shall we take these into consideration as well?

@bungle
Copy link
Member Author

@bungle bungle commented Jul 5, 2017

@p0pr0ck5 I know, and a lot of maybe old code that was using different indentation (4 spaces is most common, I think). All the discussion is welcomed. I don't have preference in any direction at this point. I merely did this to pass on some silent information.

@p0pr0ck5
Copy link
Contributor

@p0pr0ck5 p0pr0ck5 commented Jul 5, 2017

Yeah, I'm in favor of this, I'm unsure of how these files will interact with such a config. Is it possible to add entries for these files with the correct indent_size value?

@bungle
Copy link
Member Author

@bungle bungle commented Jul 12, 2017

@p0pr0ck5, certainly we can add different configs for the files that currently have different indentation. However, not sure if it worth it if they will later on follow the same formatting. What do others think?

@hishamhm
Copy link
Contributor

@hishamhm hishamhm commented Sep 21, 2017

I was just about to propose a PR adding an equivalent .editorconfig file. Text editors do not reformat a file when they open it, so even if the configuration doesn't match, nothing will break caused by this. Here is my proposed revised (and tested) .editorconfig file, can push this to this PR if accepted:


root                     = true

[*]
end_of_line              = lf
insert_final_newline     = true
trim_trailing_whitespace = true
charset                  = utf-8

[*.lua]
indent_style             = space
indent_size              = 2

[kong/templates/nginx*]
indent_style             = space
indent_size              = 4

[*.template]
indent_style             = space
indent_size              = 4

[Makefile]
indent_style             = tab
EditorConfig <http://editorconfig.org> is a proposed standard
that helps developers define and maintain consistent coding styles
between different editors and IDEs. It is supported natively by a
number of editors and IDEs, as well as native GitHub support,
and has plugins available for every major editor.
@hishamhm hishamhm force-pushed the chore/editorconfig branch from 2b4bdbb to c0690b9 Sep 21, 2017
@hishamhm
Copy link
Contributor

@hishamhm hishamhm commented Sep 21, 2017

Force-pushed an updated version of the file as per @bungle's request.

@bungle
Copy link
Member Author

@bungle bungle commented Sep 21, 2017

LGTM, but I cannot approve this as I created it.

kikito
kikito approved these changes Oct 26, 2017
@kikito kikito merged commit da660ee into master Oct 26, 2017
2 checks passed
@kikito kikito deleted the chore/editorconfig branch Oct 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants