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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make contribution rules explicitly #59

Open
KimMachineGun opened this issue Nov 15, 2018 · 9 comments
Open

Make contribution rules explicitly #59

KimMachineGun opened this issue Nov 15, 2018 · 9 comments

Comments

@KimMachineGun
Copy link
Contributor

KimMachineGun commented Nov 15, 2018

Now, gramework's contribution rules were unclear. And code style was not unified. It makes problem to contribute to this project. 馃槩

Needs

  1. Explicit documentation rules
  2. Unified code style

I think we need to discuss this proposal to make a better project.

@kirillDanshin
Copy link
Member

@KimMachineGun I agree.

We need to update contribution rules.

Altho, we need to figure out the list of rules and how exactly we want that to look and feel.

@toby3d

This comment has been minimized.

@kirillDanshin
Copy link
Member

@toby3d that's all not about linters yet, this is about dos and don'ts

@ninedraft
Copy link

ninedraft commented Nov 22, 2018

My IMHOs:

  • code must be formatted
  • code must pass all tests
  • code must pass minimum test coverage level test? (not sure)
  • code must pass some basic linter checks (go vet at least). Maybe custom linters?
  • two different commit styles:
    • small granular commits-per-mutation
    • commit-per-feature with big commit message: problem to be solved, short desc, etc.
  • every new dependency must be imported by reason, discussed and fixed on a minor version of commit hash
  • dependency blacklist: "golang.org/x/net/context", etc.
  • benchmark degradation tests?

@KimMachineGun
Copy link
Contributor Author

@ninedraft LGTM 馃憤
And, I think we also need more benchmark codes.

@toby3d
Copy link
Member

toby3d commented Nov 23, 2018

  • must be go fmt
    • Indents with tabs (with width 8), no spaces
    • In import external packages are separated from native by empty line
    • Maximum line lenght is 120 characters
  • pass all tests
  • coverage >=80%
  • pass golangci-lint default linters
  • optional: pass go-critic default linters
  • all new dependends must be explained by go mod why

@jirfag
Copy link

jirfag commented Nov 24, 2018

JFYI: golangci-lint can run go-critic starting from v1.12 release

@toby3d
Copy link
Member

toby3d commented Nov 25, 2018

@jirfag Wow, okay 馃槷

@ninedraft
Copy link

Consistency control in Go

Linters:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants