+
Skip to content

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

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ linters:
enable:
- dogsled
- dupl
- gocritic
- godot
- gofmt
- goimports
Expand All @@ -20,6 +21,10 @@ linters:
- unparam
- whitespace
linters-settings:
gocritic:
disable-all: true
enabled-checks:
- commentFormatting
gosec:
excludes:
# duplicates errcheck
Expand Down
6 changes: 3 additions & 3 deletions example/newfilewithappauth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}
itr.BaseURL = gitHost

//create git client with app transport
// create git client with app transport

Check warning on line 36 in example/newfilewithappauth/main.go

View check run for this annotation

Codecov / codecov/patch

example/newfilewithappauth/main.go#L36

Added line #L36 was not covered by tests
client, err := github.NewClient(
&http.Client{
Transport: itr,
Expand All @@ -50,8 +50,8 @@
log.Fatalf("failed to list installations: %v\n", err)
}

//capture our installationId for our app
//we need this for the access token
// capture our installationId for our app
// we need this for the access token
var installID int64
for _, val := range installations {
installID = val.GetID()
Expand Down
3 changes: 1 addition & 2 deletions github/event_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -753,8 +753,7 @@ type MemberChanges struct {
//
// GitHub API docs: https://docs.github.com/developers/webhooks-and-events/webhook-events-and-payloads#member
type MemberEvent struct {
// Action is the action that was performed. Possible values are:
//"added", "edited", "removed".
// Action is the action that was performed. Possible values are: "added", "edited", "removed".
Action *string `json:"action,omitempty"`
Member *User `json:"member,omitempty"`
Changes *MemberChanges `json:"changes,omitempty"`
Expand Down
4 changes: 2 additions & 2 deletions github/event_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9881,7 +9881,7 @@ func TestRepositoryRulesetEvent_Marshal(t *testing.T) {
},
Rules: &RepositoryRulesetEditedRules{
Added: []*RepositoryRulesetRule{
//Creating just one object with all the possible rules for testing
// Creating just one object with all the possible rules for testing
{
Creation: &RepositoryRulesetRuleType{
Type: "creation",
Expand Down Expand Up @@ -10035,7 +10035,7 @@ func TestRepositoryRulesetEvent_Marshal(t *testing.T) {
},
},
Deleted: []*RepositoryRulesetRule{
//Creating just one object with all the possible rules for testing
// Creating just one object with all the possible rules for testing
{
Creation: &RepositoryRulesetRuleType{
Type: "creation",
Expand Down
4 changes: 2 additions & 2 deletions github/github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2365,14 +2365,14 @@ func TestErrorResponse_Error(t *testing.T) {
t.Errorf("Expected non-empty ErrorResponse.Error()")
}

//dont panic if request is nil
// dont panic if request is nil
res = &http.Response{}
err = ErrorResponse{Message: "m", Response: res}
if err.Error() == "" {
t.Errorf("Expected non-empty ErrorResponse.Error()")
}

//dont panic if response is nil
// dont panic if response is nil
err = ErrorResponse{Message: "m"}
if err.Error() == "" {
t.Errorf("Expected non-empty ErrorResponse.Error()")
Expand Down
2 changes: 1 addition & 1 deletion scrape/apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ type OAuthApp struct {
type AppManifest struct {
// The name of the GitHub App.
Name *string `json:"name,omitempty"`
//Required. The homepage of your GitHub App.
// Required. The homepage of your GitHub App.
URL *string `json:"url,omitempty"`
// The full URL(s) of the endpoint(s) to authenticate users via the GitHub App (Max: 10).
CallbackURLs []string `json:"callback_urls,omitempty"`
Expand Down
1 change: 0 additions & 1 deletion test/fields/fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

{"users/octocat", &github.User{}},
{"user", &github.User{}},
{"users/willnorris/keys", &[]github.Key{}},
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载