Skip to content

Commit

Permalink
docs: put a space between // and comment text
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear committed Oct 18, 2024
1 parent 8c273e1 commit 47c57ef
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 11 deletions.
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 @@ func main() {
}
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 @@ func main() {
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{}},
{"users/octocat", &github.User{}},
{"user", &github.User{}},
{"users/willnorris/keys", &[]github.Key{}},
Expand Down

0 comments on commit 47c57ef

Please # to comment.