Skip to content

Commit f3201cf

Browse files
committed
chore: check license headers
1 parent 07b0446 commit f3201cf

File tree

7 files changed

+25
-9
lines changed

7 files changed

+25
-9
lines changed

.golangci.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ linters:
1111
- gocritic
1212
- godot
1313
- gofmt
14+
- goheader
1415
- goimports
1516
- gosec
1617
- misspell
1718
- nakedret
18-
- perfsprint
1919
- paralleltest
20+
- perfsprint
2021
- revive
2122
- sliceofpointers
2223
- stylecheck
@@ -35,6 +36,15 @@ linters-settings:
3536
enabled-checks:
3637
- commentedOutCode
3738
- commentFormatting
39+
goheader:
40+
values:
41+
regexp:
42+
CopyrightDate: "Copyright \\d{4} "
43+
template: |-
44+
{{CopyrightDate}}The go-github AUTHORS. All rights reserved.
45+
46+
Use of this source code is governed by a BSD-style
47+
license that can be found in the LICENSE file.
3848
gosec:
3949
excludes:
4050
# duplicates errcheck

github/admin_stats_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
// Copyright 2017 The go-github AUTHORS. All rights reserved.
2+
//
3+
// Use of this source code is governed by a BSD-style
4+
// license that can be found in the LICENSE file.
5+
16
package github
27

38
import (

github/enterprise_audit_log_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright 2021 The go-github AUTHORS. All rights reserved.
22
//
3-
// `Use` of this source code is governed by a BSD-style
3+
// Use of this source code is governed by a BSD-style
44
// license that can be found in the LICENSE file.
55

66
package github

github/gists.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright 2013 The go-github AUTHORS. All rights reserved.
22
//
3-
// Use of this source code is governed by BSD-style
3+
// Use of this source code is governed by a BSD-style
44
// license that can be found in the LICENSE file.
55

66
package github

github/orgs_audit_log_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright 2021 The go-github AUTHORS. All rights reserved.
22
//
3-
// `Use` of this source code is governed by a BSD-style
3+
// Use of this source code is governed by a BSD-style
44
// license that can be found in the LICENSE file.
55

66
package github

github/pulls_reviewers.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,7 @@ func (s *PullRequestsService) ListReviewers(ctx context.Context, owner, repo str
8585
func (s *PullRequestsService) RemoveReviewers(ctx context.Context, owner, repo string, number int, reviewers ReviewersRequest) (*Response, error) {
8686
// reviewers.Reviewers may be empty if the caller wants to remove teams, but not users. Unlike AddReviewers,
8787
// "reviewers" is a required param here. Reference: https://github.com/google/go-github/issues/3336
88-
removeRequest := removeReviewersRequest{
89-
NodeID: reviewers.NodeID,
90-
Reviewers: reviewers.Reviewers,
91-
TeamReviewers: reviewers.TeamReviewers,
92-
}
88+
removeRequest := removeReviewersRequest(reviewers)
9389

9490
if removeRequest.Reviewers == nil {
9591
// GitHub accepts the empty list, but rejects null. Removing `omitempty` is not enough - we also have to promote nil to [].

scrape/apps_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
// Copyright 2013 The go-github AUTHORS. All rights reserved.
2+
//
3+
// Use of this source code is governed by a BSD-style
4+
// license that can be found in the LICENSE file.
5+
16
package scrape
27

38
import (

0 commit comments

Comments
 (0)