.editorconfig for golang projects & github pr automated gofmt checks

1,409 views
Skip to first unread message

Sankar

unread,
Jul 1, 2019, 11:54:29 AM7/1/19
to golang-nuts
Hi

We use github for our sources. Developers are free to choose their IDEs and tools. Sometimes, people end up committing sources using spaces instead of tabs, etc. Not all developers do goimports/gofmt on save. So, we want to automate this process. However, instead of adding git pre-commit hooks, we want to have this done only when people raise a github PR. Have any of you done this in your project and shared your experience in a blog / writeup ? Please let us know. Googling would still be done for this, but wanted to ask in this list also.

Another somewhat related query is, we are also considering adding a .editorconfig for our Golang projects. Are there any standard .editorconfig settings for *.go that you use ?

Thanks.

tgoshinski

unread,
Jul 1, 2019, 3:42:09 PM7/1/19
to golang-nuts
[*.go]
indent_size
= 4
indent_style
= tab


From my base .editorconfig
Reply all
Reply to author
Forward
0 new messages