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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hacktoberfest-2018 contributions and audits #662

Closed
quasilyte opened this issue Sep 30, 2018 · 6 comments
Closed

Hacktoberfest-2018 contributions and audits #662

quasilyte opened this issue Sep 30, 2018 · 6 comments
Labels
good first issue Good for newcomers Hacktoberfest help wanted Extra attention is needed

Comments

@quasilyte
Copy link
Member

quasilyte commented Sep 30, 2018

This issue is for tracking all #hacktoberfest contributions.
See https://hacktoberfest.digitalocean.com/eventkit.

Step-by-step instruction:

  1. Register at https://hacktoberfest.digitalocean.com/ by pressing "sign up" and using your github account. You should be able to see your progress at https://hacktoberfest.digitalocean.com/stats/${username} (e.g. https://hacktoberfest.digitalocean.com/stats/Quasilyte).

  2. Choose Go project to contribute to. Pick any project you like and that seems like an active (last commit have been merged not too long ago). Let's say we've chosen github.com/foo/bar project (just an example).

  3. Do a go get -v github.com/foo/bar/.... This downloads package under your $GOPATH/src/github.com/foo/bar.

  4. Do a cd $GOPATH/src/github.com/foo/bar (for convenience).

  5. Now run gocritic over the project. The suggested way is:

gocritic check-project -withExperimental -disable=unnamedResult,appendCombine,importPackageName,nestingReduce,emptyFmt,hugeParam,sqlRowsClose `pwd`

You may want to disable more checkers if they doesn't look useful to you.

  1. Analyze the issues found on the (4) step. If there are some that may worth a PR, continue to the next step, otherwise start from the (2), now with a different project.

5.1 (Optional) If you've spotted an obvious false positive, please fill an issue on gocritic tracker. You can even try to fix that problem yourself, earning another contribution.

  1. Fork a project on the github. Suppose your username is gosu_pro, then forked repo can have path like github.com/gosu_pro/bar.

  2. From the $GOPATH/src/github.com/foo/bar directory do:

git remote add fork https://github.com/gosu_pro/bar.git
  1. Now fix problems linter found. It's a good practice to concentrate on the most severe and single check first, packing it into a single commit, to make reviewers life easier. It's OK to send N PRs, every of which fixes only 1 kinds of a problem.

  2. Create a branch with a fixes: git checkout -b my_fix_1 (you can give a better branch name, for example, a checker name that found an issue).

  3. Add and commit changes: git add -u && git commit. Write a good commit message. You may want to inspect previous repo commits, so your commit message is consistent with them. Or you can take some inspirations from the linked contributions inside this thread.

  4. Push your changes to your fork: git push fork my_fix_1.

  5. Now you can do a PR (Pull Request) on the github from your fork to the upstream (original) repo.
    So, you need to merge my_fix_1 branch into master (or dev, depends on the project, but maintainers can always redirect merge branch into something they find more appropriate).

  6. (Optional) Write your contribution here! We will be glad to see how gocritic helps you to do open-source, etc.

====

Registration:

Please

Checking your progress:

https://hacktoberfest.digitalocean.com/stats/${username}

For example, https://hacktoberfest.digitalocean.com/stats/Quasilyte

@quasilyte quasilyte added help wanted Extra attention is needed good first issue Good for newcomers labels Sep 30, 2018
@quasilyte
Copy link
Member Author

CC @cristaloleg @fexolm @ludweeg

@quasilyte
Copy link
Member Author

quasilyte commented Oct 1, 2018

Status Pull request Checker that found an issue
✔️ go-kit/kit#767 https://go-critic.github.io/overview#unlambda-ref
✖️ go-kit/kit#768 https://go-critic.github.io/overview#sloppyLen-ref
✔️ go-kit/kit#769 https://go-critic.github.io/overview#assignOp-ref
✔️ go-kit/kit#770 https://go-critic.github.io/overview#commentedOutCode-ref
✔️ v2ray/v2ray-core#1292 https://go-critic.github.io/overview#builtinShadow-ref
✔️ v2ray/v2ray-core#1293 https://go-critic.github.io/overview#ifElseChain-ref
✔️ https://github.com/jinzhu/gorm/pull/2121 https://go-critic.github.io/overview#ifElseChain-ref
✔️ src-d/gitbase#503 https://go-critic.github.io/overview#unslice-ref
✔️ src-d/gitbase#504 https://go-critic.github.io/overview#switchTrue-ref
✔️ src-d/gitbase#505 https://go-critic.github.io/overview#typeUnparen-ref
✔️ microsoft/opengcs#260 https://go-critic.github.io/overview#unslice-ref
? microsoft/DUCK#131 https://go-critic.github.io/overview#commentedOutCode-ref
? microsoft/DUCK#132 https://go-critic.github.io/overview#commentedOutCode-ref
? microsoft/KubeGPU#38 https://go-critic.github.io/overview#singleCaseSwitch-ref
? microsoft/KubeGPU#39 https://go-critic.github.io/overview#commentedOutCode-ref
? microsoft/KubeGPU#40 https://go-critic.github.io/overview#assignOp
✔️ future-architect/vuls#714 https://go-critic.github.io/overview#commentedOutCode-ref
✔️ future-architect/vuls#715 https://go-critic.github.io/overview#unslice-ref
✔️ future-architect/vuls#716 https://go-critic.github.io/overview#assignOp-ref
? golang/dep#2027 https://go-critic.github.io/overview#boolExprSimplify-ref
? golang/dep#2028 https://go-critic.github.io/overview#assignOp-ref
? golang/dep#2029 https://go-critic.github.io/overview#unlambda-ref
? golang/dep#2030 https://go-critic.github.io/overview#commentedOutCode-ref
✔️ golang/dep#2031 https://go-critic.github.io/overview#sloppyLen

@quasilyte
Copy link
Member Author

quasilyte commented Oct 2, 2018

Looks like Microsoft did a good job encouraging even more contributors to participate.
Check out https://open.microsoft.com/2018/09/30/join-hacktoberfest-2018-celebration-microsoft/ and
https://twitter.com/BerndVerst/status/1046563359204622338.
🎉

@cristaloleg
Copy link
Member

go-gitea/gitea/pull/5115 namedConst
go-gitea/gitea/pull/5119 defaultCaseOrder
go-gitea/gitea/pull/5120 sloppyLen
go-gitea/gitea/pull/5121 dupBranchBody
go-gitea/gitea/pull/5122 typeSwitchVar

@cristaloleg
Copy link
Member

See you on Hacktoberfest2019

quasilyte added a commit to go-critic/go-critic.github.io that referenced this issue Feb 9, 2019
quasilyte added a commit to go-critic/go-critic.github.io that referenced this issue Feb 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants