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

chore: Check and fix license headers #3449

Merged
merged 2 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 11 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ linters:
- gocritic
- godot
- gofmt
- goheader
- goimports
- gosec
- misspell
- nakedret
- perfsprint
- paralleltest
- perfsprint
- revive
- sliceofpointers
- stylecheck
Expand All @@ -35,6 +36,15 @@ linters-settings:
enabled-checks:
- commentedOutCode
- commentFormatting
goheader:
values:
regexp:
CopyrightDate: "Copyright \\d{4} "
template: |-
{{CopyrightDate}}The go-github AUTHORS. All rights reserved.

Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
gosec:
excludes:
# duplicates errcheck
Expand Down
5 changes: 5 additions & 0 deletions github/admin_stats_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright 2017 The go-github AUTHORS. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package github

import (
Expand Down
2 changes: 1 addition & 1 deletion github/enterprise_audit_log_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2021 The go-github AUTHORS. All rights reserved.
//
// `Use` of this source code is governed by a BSD-style
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package github
Expand Down
2 changes: 1 addition & 1 deletion github/gists.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2013 The go-github AUTHORS. All rights reserved.
//
// Use of this source code is governed by BSD-style
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package github
Expand Down
2 changes: 1 addition & 1 deletion github/orgs_audit_log_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2021 The go-github AUTHORS. All rights reserved.
//
// `Use` of this source code is governed by a BSD-style
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package github
Expand Down
6 changes: 1 addition & 5 deletions github/pulls_reviewers.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,7 @@ func (s *PullRequestsService) ListReviewers(ctx context.Context, owner, repo str
func (s *PullRequestsService) RemoveReviewers(ctx context.Context, owner, repo string, number int, reviewers ReviewersRequest) (*Response, error) {
// reviewers.Reviewers may be empty if the caller wants to remove teams, but not users. Unlike AddReviewers,
// "reviewers" is a required param here. Reference: https://github.com/google/go-github/issues/3336
removeRequest := removeReviewersRequest{
NodeID: reviewers.NodeID,
Reviewers: reviewers.Reviewers,
TeamReviewers: reviewers.TeamReviewers,
}
removeRequest := removeReviewersRequest(reviewers)

if removeRequest.Reviewers == nil {
// GitHub accepts the empty list, but rejects null. Removing `omitempty` is not enough - we also have to promote nil to [].
Expand Down
5 changes: 5 additions & 0 deletions scrape/apps_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright 2013 The go-github AUTHORS. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package scrape

import (
Expand Down
5 changes: 5 additions & 0 deletions scrape/example/scrape/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright 2019 The go-github AUTHORS. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// The scrape tool demonstrates use of the github.com/google/go-github/scrape
// package to fetch data from GitHub. The tool lists whether third-party app
// restrictions are enabled for an organization, and lists information about
Expand Down
5 changes: 5 additions & 0 deletions scrape/forms_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright 2013 The go-github AUTHORS. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package scrape

import (
Expand Down
5 changes: 5 additions & 0 deletions scrape/scrape_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright 2013 The go-github AUTHORS. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package scrape

import (
Expand Down
Loading