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

Add go generate mention to CONTRIBUTING.md #2587

Merged
merged 12 commits into from Feb 13, 2023
Merged

Conversation

XaurDesu
Copy link
Contributor

a WIP for the improvement of CONTRIBUTING.md as detailed by #2579 , mentioning the existence of generated files and the fact that they should be added alongside the manual part of the commit. We could probably add a few more things, but those will come along if suggestions do.

@codecov
Copy link

codecov bot commented Nov 30, 2022

Codecov Report

Merging #2587 (f47debd) into master (c855eb5) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #2587   +/-   ##
=======================================
  Coverage   98.05%   98.05%           
=======================================
  Files         131      131           
  Lines       11442    11442           
=======================================
  Hits        11219    11219           
  Misses        152      152           
  Partials       71       71           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@gmlewis gmlewis changed the title add go generate mention to CONTRIBUTING.md Add go generate mention to CONTRIBUTING.md Nov 30, 2022
Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is an improvement.
Line 58 above already mentions this step.

The -x is completely unnecessary, as this step only modifies files that git already knows about, and therefore a simple commit and push is totally sufficient, and all the modifications will be caught.

I'll leave this PR open for now (in case there are other comments), but to me, mentioning what should have done "Before pushing commits" should actually be listed BEFORE this step, which in fact it already is.

@XaurDesu
Copy link
Contributor Author

So, maybe should we put the information on generated files after line 58? moreso explaining the function of go generate when the concept is introduced. Or what ideas do you have regarding this?

@gmlewis
Copy link
Collaborator

gmlewis commented Nov 30, 2022

@Parker77 - do you have any ideas about how these instructions in CONTRIBUTING.md can be improved?

For context, there was some confusion in #2577 and we are trying to minimize the friction that new contributors encounter when creating PRs for this repo. Do you have any thoughts about this?

@Parker77
Copy link

I guess in step 5 (maybe right after line 60), like @XaurDesu suggested, we could give a brief explanation of what’s happening when that command is run, along with the instruction that the resulting changes should be included in a PR, which could go something like:

The go generate ./... command will update or generate certain files, and the resulting changes should be included in your pull request.

@XaurDesu
Copy link
Contributor Author

Sorry for the absence guys, i've been a bit occupied in my personal life as of late, coming back to the topic at hand, i think that yes, i think @Parker77 's format seems like a good idea for them. I'll be adding that exact comment to README.md once i get home from work today, if you guys don't mind. Maybe i could convert this pull request into a draft until we have a specific plan for the whole thing.

@XaurDesu
Copy link
Contributor Author

Hey guys, do you think it could be a good idea to add a few links to the official Go documentation of the commands of interest in README.md? Also, i just realized that README.md mentions golint as a command that should be ran after fmt. but According to the golint repository, golint is deprecated, and given that it reccomends running 'vet' instead of golint, and that is a command we use already, should we change that reference?

@gmlewis
Copy link
Collaborator

gmlewis commented Jan 30, 2023

Adding links to official Go documentation in the README is fine by me.
And yes, updating the README from "golint" to "go vet" sounds like a good idea too.

@XaurDesu
Copy link
Contributor Author

XaurDesu commented Feb 3, 2023

Tried putting some comments in the style of @Parker77 's idea for them (including his description of go generate, actually) please check for any styling/conceptual problems in it, please. Also updated the go lint mentions.

Copy link

@Parker77 Parker77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @XaurDesu !
I made some comments and suggestions.

CONTRIBUTING.md Outdated

1. Any significant changes should almost always be accompanied by tests. The
2. Any significant changes should almost always be accompanied by tests. The
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please revert the changes to the numbering? I know it makes sense to have the correct number in the code, but with markdown it’s often just fine to designate that each of these is a list item, which can be done with 1. This article talks about it.

CONTRIBUTING.md Outdated
* `go generate github.com/google/go-github/...`
* `go test github.com/google/go-github/...`
* `go vet github.com/google/go-github/...`

1. Do your best to have [well-formed commit messages][] for each change.
The `go generate ./...` command will update or generate certain files, and the resulting changes should be included in your pull request.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add line breaks (lines 61, 63, 65, 67, and 77 are all sort of long; adding line breaks may mean needing to adjust the text below each line, too) to match the rest of the file?
Could you also please delete the extra blank lines in between the lines of text that are all part of this block (i.e.: lines 62, 64, and 66)?

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
XaurDesu and others added 4 commits February 3, 2023 13:20
Co-authored-by: Parker77 <20973702+Parker77@users.noreply.github.com>
Co-authored-by: Parker77 <20973702+Parker77@users.noreply.github.com>
@XaurDesu
Copy link
Contributor Author

XaurDesu commented Feb 3, 2023

Just committed the changes requested.

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @XaurDesu .
Just a couple tweaks, please.

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
XaurDesu and others added 2 commits February 4, 2023 12:29
Co-authored-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
Co-authored-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
@XaurDesu
Copy link
Contributor Author

XaurDesu commented Feb 4, 2023

Just commited both changes, it should be good now

@XaurDesu XaurDesu requested a review from gmlewis February 4, 2023 17:31
Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whups, I missed a broken link in the last review.
Hopefully I've found them all now.

CONTRIBUTING.md Outdated Show resolved Hide resolved
Co-authored-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
@XaurDesu
Copy link
Contributor Author

XaurDesu commented Feb 6, 2023

Just corrected the dead link, i should probably have seen it before you honestly. Sorry for that.

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @XaurDesu !
LGTM.

Awaiting LGTM+Approval from @Parker77 then will merge.

@XaurDesu
Copy link
Contributor Author

Hmm, it's been a few days, are we sure @Parker77 is available for code review?

Copy link

@Parker77 Parker77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks, @XaurDesu !

@gmlewis
Copy link
Collaborator

gmlewis commented Feb 13, 2023

Thank you, @Parker77 !
Merging.

@gmlewis gmlewis merged commit 175f3bf into google:master Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants