Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
provide config for editorconfig plugins
* If a dev adds an editorconfig plugin to their editor, automatically configure their editor for code style. * Specify 4-space softtabs so new code will be compatible with Python 3. * Put the same settings in .gitattributes so git diff highlights whitespace errors.
- Loading branch information
1 parent
47a5cda
commit 3be5a2d
Showing
3 changed files
with
74 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
; Unify the coding style for different editors and IDEs. | ||
; Plugins are available for emacs, vim, gedit, textmate, and more | ||
; at http://editorconfig.org/#download | ||
; | ||
; See http://editorconfig.org or https://github.com/editorconfig/ | ||
; | ||
; If you change a setting in this file, | ||
; you should also change .gitattributes | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.py] | ||
indent_size = 4 | ||
|
||
[*.yml] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
###################################################################### | ||
# gitattributes(5) describes the format and usage of this file. | ||
# | ||
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html | ||
# http://git-scm.com/book/ch7-2.html | ||
# http://urbanautomaton.com/blog/2011/07/28/git-grep-and-language-specific-diffs/ | ||
# https://help.github.com/articles/dealing-with-line-endings | ||
###################################################################### | ||
# | ||
# If you change a setting here, | ||
# you should also change .editorconfig | ||
# | ||
*.py diff=python text eol=lf whitespace="trailing-space,space-before-tab,tab-in-indent,blank-at-eof,tabwidth=4" | ||
*.yml text eol=lf whitespace="trailing-space,space-before-tab,tab-in-indent,blank-at-eof,tabwidth=2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters