sdk-go icon indicating copy to clipboard operation
sdk-go copied to clipboard

Provide a code style for IDEs

Open spolti opened this issue 2 years ago • 2 comments

Provide a standard code style profile so contributors can import it to help to keep a pattern across the code base. For now, provides a profile for:

  • IntelliJ / GoLand

Note: This info needs to go into the CONTRIBUTIONS.md

spolti avatar Oct 05 '22 12:10 spolti

@spolti thanks! Are you going to do it? Please add to the CONTRIBUTIONS.md file too.

ricardozanini avatar Oct 05 '22 12:10 ricardozanini

@spolti thanks! Are you going to do it? Please add to the CONTRIBUTIONS.md file too.

Yes :)

spolti avatar Oct 05 '22 12:10 spolti

@lsytj0413 @brlala @ricardozanini @davidesalerno hey guys, I would like to ask for some inputs here, for go, the code formatting is a little bit different when compared with other languages. e.g. for import, we have a few different tools that does it. gofmt, goimports.

So, instead of having a code style I was thinking on:

  • import: default to goimports and add instruction on how to configure it on InjtelliJ/GoLand, VSCode, something else?
  • provide a default editorconfig with only the go properties and explain how to import it to InjtelliJ/GoLand, VSCode, something else?
  • add GHA lint checks (https://golangci-lint.run/usage/linters/), for now, maybe the default linters + gofmt and goheaders.
  • ans last, add all these info in the CONTRIBUTORS_GUIDE.md

wdyt?

spolti avatar Nov 04 '22 18:11 spolti

Go ahead :)

ricardozanini avatar Nov 14 '22 14:11 ricardozanini

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Dec 30 '22 00:12 github-actions[bot]