Skip to content
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

Implement FSFE REUSE for golang files #21840

Merged
merged 20 commits into from
Nov 27, 2022
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,8 @@ Code that you contribute should use the standard copyright header:

```
// Copyright 2022 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT
```

Files in the repository contain copyright from the year they are added
Expand Down
4 changes: 2 additions & 2 deletions build.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT


//go:build vendor

Expand Down
3 changes: 1 addition & 2 deletions build/code-batch-process.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2021 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

//go:build ignore

Expand Down
3 changes: 1 addition & 2 deletions build/codeformat/formatimports.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2021 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package codeformat

Expand Down
3 changes: 1 addition & 2 deletions build/codeformat/formatimports_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2021 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package codeformat

Expand Down
3 changes: 1 addition & 2 deletions build/generate-bindata.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

//go:build ignore

Expand Down
7 changes: 3 additions & 4 deletions build/generate-emoji.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// Copyright 2015 Kenneth Shaw
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

//go:build ignore

Expand Down Expand Up @@ -209,8 +208,8 @@ func generate() ([]byte, error) {

const hdr = `
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT
package emoji
Expand Down
3 changes: 1 addition & 2 deletions build/generate-go-licenses.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

//go:build ignore

Expand Down
3 changes: 1 addition & 2 deletions build/gocovmerge.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// Copyright (c) 2015, Wade Simmons
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

// gocovmerge takes the results from multiple `go test -coverprofile` runs and
// merges them into one profile
Expand Down
3 changes: 1 addition & 2 deletions cmd/admin.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright 2016 The Gogs Authors. All rights reserved.
// Copyright 2016 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/admin_auth_ldap.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2019 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/admin_auth_ldap_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2019 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/cert.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Copyright 2009 The Go Authors. All rights reserved.
// Copyright 2014 The Gogs Authors. All rights reserved.
// Copyright 2016 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2018 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

// Package cmd provides subcommands to the gitea binary - such as "web" or
// "admin".
Expand Down
3 changes: 1 addition & 2 deletions cmd/convert.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2019 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/docs.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/doctor.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2019 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/dump.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright 2014 The Gogs Authors. All rights reserved.
// Copyright 2016 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/dump_repo.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/embedded.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

//go:build bindata

Expand Down
3 changes: 1 addition & 2 deletions cmd/embedded_stub.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

//go:build !bindata

Expand Down
3 changes: 1 addition & 2 deletions cmd/generate.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright 2016 The Gogs Authors. All rights reserved.
// Copyright 2016 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/hook.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2017 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/hook_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2021 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/keys.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2018 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/mailer.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/main_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/manager.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/manager_logging.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/migrate.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2018 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/migrate_storage.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/migrate_storage_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/restore_repo.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/serv.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright 2014 The Gogs Authors. All rights reserved.
// Copyright 2016 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/web.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2014 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/web_acme.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/web_graceful.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2016 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions cmd/web_https.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2021 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package cmd

Expand Down
3 changes: 1 addition & 2 deletions contrib/environment-to-ini/environment-to-ini.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2019 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package main

Expand Down
3 changes: 1 addition & 2 deletions contrib/fixtures/fixture_generation.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package main

Expand Down
3 changes: 1 addition & 2 deletions contrib/pr/checkout.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package main

Expand Down
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright 2014 The Gogs Authors. All rights reserved.
// Copyright 2016 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

// Gitea (git with a cup of tea) is a painless self-hosted Git Service.
package main // import "code.gitea.io/gitea"
Expand Down
3 changes: 1 addition & 2 deletions models/activities/action.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright 2014 The Gogs Authors. All rights reserved.
// Copyright 2019 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package activities

Expand Down
3 changes: 1 addition & 2 deletions models/activities/action_list.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2018 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package activities

Expand Down
3 changes: 1 addition & 2 deletions models/activities/action_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package activities_test

Expand Down
3 changes: 1 addition & 2 deletions models/activities/main_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// SPDX-License-Identifier: MIT

package activities_test

Expand Down
Loading