Skip to content

Commit

Permalink
Add .editorconfig and update style notes.
Browse files Browse the repository at this point in the history
We've long since abandoned an 80-column limit. `gofmt` already
standardizes most of what can be set in `.editorconfig`, but it's useful
for non-go code and for the github web viewer.
  • Loading branch information
bdarnell committed Nov 25, 2015
1 parent 5298df5 commit eaef78f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# See http://editorconfig.org

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

# For non-go files, we indent with two spaces. In go files we indent
# with tabs but still set indent_size to control the github web viewer.
indent_size=2
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ To add or update a go dependency:
- create a PR with all the changes

### Style guide
We're following the [Google Go Code Review](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) fairly closely. In particular, you want to watch out for proper punctuation and capitalization and make sure that your lines stay well below 80 characters.
We're following the [Google Go Code Review](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) fairly closely. In particular, you want to watch out for proper punctuation and capitalization in comments. We use two-space indents in non-Go code (in Go, we follow `gofmt` which indents with tabs). Format your code assuming it will be read in a window 100 columns wide. Wrap code and comments at 100 characters unless doing so makes the code less legible".

### Code review workflow

Expand Down

0 comments on commit eaef78f

Please sign in to comment.