Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

docs: put a space between // and comment text #3329

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

alexandear
Copy link
Contributor

The PR formats comments by putting a space between // and comment text. This is found with the help of gocritic's commentFormatting check.

Details
❯ golangci-lint run
test/fields/fields.go:52:3: commentFormatting: put a space between `//` and comment text (gocritic)
                //{"rate_limit", &github.RateLimits{}},
                ^
github/event_types.go:757:2: commentFormatting: put a space between `//` and comment text (gocritic)
        //"added", "edited", "removed".
        ^
github/event_types_test.go:9884:6: commentFormatting: put a space between `//` and comment text (gocritic)
                                        //Creating just one object with all the possible rules for testing
                                        ^
❯ golangci-lint run
test/fields/fields.go:52:3: commentFormatting: put a space between `//` and comment text (gocritic)
                //{"rate_limit", &github.RateLimits{}},
                ^
github/event_types.go:757:2: commentFormatting: put a space between `//` and comment text (gocritic)
        //"added", "edited", "removed".
        ^
github/event_types_test.go:9884:6: commentFormatting: put a space between `//` and comment text (gocritic)
                                        //Creating just one object with all the possible rules for testing
                                        ^
github/event_types_test.go:10038:6: commentFormatting: put a space between `//` and comment text (gocritic)
                                        //Creating just one object with all the possible rules for testing
                                        ^
github/github_test.go:2368:2: commentFormatting: put a space between `//` and comment text (gocritic)
        //dont panic if request is nil
        ^
github/github_test.go:2375:2: commentFormatting: put a space between `//` and comment text (gocritic)
        //dont panic if response is nil
        ^

@@ -49,7 +49,6 @@ func main() {
url string
typ interface{}
}{
//{"rate_limit", &github.RateLimits{}},
Copy link
Contributor Author

@alexandear alexandear Oct 18, 2024

Choose a reason for hiding this comment

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

Removed as this has been commented for 11 years.

image

@alexandear alexandear force-pushed the docs/put-space-between-comment branch from b73751e to 47c57ef Compare October 18, 2024 11:34
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, @alexandear !
LGTM.
Merging.

Copy link

codecov bot commented Oct 18, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 93.01%. Comparing base (2b8c7fa) to head (47c57ef).
Report is 156 commits behind head on master.

Files with missing lines Patch % Lines
example/newfilewithappauth/main.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3329      +/-   ##
==========================================
- Coverage   97.72%   93.01%   -4.71%     
==========================================
  Files         153      172      +19     
  Lines       13390    14848    +1458     
==========================================
+ Hits        13085    13811     +726     
- Misses        215      944     +729     
- Partials       90       93       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gmlewis gmlewis merged commit 9412ac2 into google:master Oct 18, 2024
5 of 7 checks passed
@alexandear alexandear deleted the docs/put-space-between-comment branch October 19, 2024 09:51
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants