Skip to content

Commit b7125c8

Browse files
committed
Update go dev dependencies
1 parent 0a85537 commit b7125c8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+71
-67
lines changed

.golangci.yml

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
linters:
22
enable:
3-
- gosimple
4-
- deadcode
5-
- typecheck
6-
- govet
7-
- errcheck
8-
- staticcheck
9-
- unused
10-
- structcheck
11-
- varcheck
3+
- bidichk
4+
# - deadcode # deprecated - https://github.com/golangci/golangci-lint/issues/1841
5+
- depguard
126
- dupl
13-
#- gocyclo # The cyclomatic complexety of a lot of functions is too high, we should refactor those another time.
14-
- gofmt
7+
- errcheck
158
- gocritic
16-
- bidichk
17-
- ineffassign
18-
- revive
9+
# - gocyclo # The cyclomatic complexety of a lot of functions is too high, we should refactor those another time.
10+
- gofmt
1911
- gofumpt
20-
- depguard
12+
- gosimple
13+
- govet
14+
- ineffassign
2115
- nakedret
22-
- unconvert
23-
- wastedassign
2416
- nolintlint
17+
- revive
18+
- staticcheck
19+
# - structcheck # deprecated - https://github.com/golangci/golangci-lint/issues/1841
2520
- stylecheck
21+
- typecheck
22+
- unconvert
23+
- unused
24+
# - varcheck # deprecated - https://github.com/golangci/golangci-lint/issues/1841
25+
# - wastedassign # disabled - https://github.com/golangci/golangci-lint/issues/2649
2626
enable-all: false
2727
disable-all: true
2828
fast: false

Makefile

+6-6
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ COMMA := ,
2626
XGO_VERSION := go-1.19.x
2727

2828
AIR_PACKAGE ?= github.com/cosmtrek/[email protected]
29-
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@2.5.0
30-
ERRCHECK_PACKAGE ?= github.com/kisielk/[email protected].1
31-
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.3.1
32-
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.47.0
29+
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@2.6.0
30+
ERRCHECK_PACKAGE ?= github.com/kisielk/[email protected].2
31+
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.4.0
32+
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.1
3333
GXZ_PAGAGE ?= github.com/ulikunitz/xz/cmd/[email protected]
3434
MISSPELL_PACKAGE ?= github.com/client9/misspell/cmd/[email protected]
35-
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/[email protected].0
35+
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/[email protected].3
3636
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
37-
GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1.3.0
37+
GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1.5.0
3838
GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@latest
3939

4040
DOCKER_IMAGE ?= gitea/gitea

models/db/context.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ type contextKey struct {
2121
}
2222

2323
// enginedContextKey is a context key. It is used with context.Value() to get the current Engined for the context
24-
var enginedContextKey = &contextKey{"engined"}
25-
var _ Engined = &Context{}
24+
var (
25+
enginedContextKey = &contextKey{"engined"}
26+
_ Engined = &Context{}
27+
)
2628

2729
// Context represents a db context
2830
type Context struct {

models/migrations/v1_17/main_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2021 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_17 // nolint
4+
package v1_17 //nolint
55

66
import (
77
"testing"

models/migrations/v1_17/v211.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_17 // nolint
4+
package v1_17 //nolint
55

66
import (
77
"fmt"

models/migrations/v1_17/v212.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_17 // nolint
4+
package v1_17 //nolint
55

66
import (
77
"code.gitea.io/gitea/modules/timeutil"

models/migrations/v1_17/v213.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_17 // nolint
4+
package v1_17 //nolint
55

66
import (
77
"xorm.io/xorm"

models/migrations/v1_17/v214.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_17 // nolint
4+
package v1_17 //nolint
55

66
import (
77
"xorm.io/xorm"

models/migrations/v1_17/v215.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_17 // nolint
4+
package v1_17 //nolint
55

66
import (
77
"code.gitea.io/gitea/models/pull"

models/migrations/v1_17/v216.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_17 // nolint
4+
package v1_17 //nolint
55

66
// This migration added non-ideal indices to the action table which on larger datasets slowed things down
77
// it has been superceded by v218.go

models/migrations/v1_17/v217.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_17 // nolint
4+
package v1_17 //nolint
55

66
import (
77
"code.gitea.io/gitea/modules/setting"

models/migrations/v1_17/v218.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_17 // nolint
4+
package v1_17 //nolint
55

66
import (
77
"code.gitea.io/gitea/modules/setting"

models/migrations/v1_17/v219.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_17 // nolint
4+
package v1_17 //nolint
55

66
import (
77
"time"

models/migrations/v1_17/v220.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_17 // nolint
4+
package v1_17 //nolint
55

66
import (
77
packages_model "code.gitea.io/gitea/models/packages"

models/migrations/v1_17/v221.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_17 // nolint
4+
package v1_17 //nolint
55

66
import (
77
"encoding/base32"

models/migrations/v1_17/v221_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_17 // nolint
4+
package v1_17 //nolint
55

66
import (
77
"encoding/base32"

models/migrations/v1_17/v222.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_17 // nolint
4+
package v1_17 //nolint
55

66
import (
77
"context"

models/migrations/v1_17/v223.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_17 // nolint
4+
package v1_17 //nolint
55

66
import (
77
"context"

models/migrations/v1_18/main_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2021 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_18 // nolint
4+
package v1_18 //nolint
55

66
import (
77
"testing"

models/migrations/v1_18/v224.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_18 // nolint
4+
package v1_18 //nolint
55

66
import (
77
"xorm.io/xorm"

models/migrations/v1_18/v225.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_18 // nolint
4+
package v1_18 //nolint
55

66
import (
77
"code.gitea.io/gitea/modules/setting"

models/migrations/v1_18/v226.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_18 // nolint
4+
package v1_18 //nolint
55

66
import (
77
"xorm.io/builder"

models/migrations/v1_18/v227.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_18 // nolint
4+
package v1_18 //nolint
55

66
import (
77
"fmt"

models/migrations/v1_18/v228.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_18 // nolint
4+
package v1_18 //nolint
55

66
import (
77
"code.gitea.io/gitea/modules/timeutil"

models/migrations/v1_18/v230.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_18 // nolint
4+
package v1_18 //nolint
55

66
import (
77
"xorm.io/xorm"

models/migrations/v1_19/main_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2021 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_19 // nolint
4+
package v1_19 //nolint
55

66
import (
77
"testing"

models/migrations/v1_19/v232.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_19 // nolint
4+
package v1_19 //nolint
55

66
import (
77
"code.gitea.io/gitea/modules/setting"

models/migrations/v1_6/v70.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_6 // nolint
4+
package v1_6 //nolint
55

66
import (
77
"fmt"

models/migrations/v1_6/v71.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_6 // nolint
4+
package v1_6 //nolint
55

66
import (
77
"fmt"

models/migrations/v1_6/v72.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_6 // nolint
4+
package v1_6 //nolint
55

66
import (
77
"fmt"

models/migrations/v1_7/v73.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_7 // nolint
4+
package v1_7 //nolint
55

66
import (
77
"xorm.io/xorm"

models/migrations/v1_7/v74.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_7 // nolint
4+
package v1_7 //nolint
55

66
import "xorm.io/xorm"
77

models/migrations/v1_7/v75.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_7 // nolint
4+
package v1_7 //nolint
55

66
import (
77
"xorm.io/builder"

models/migrations/v1_8/v76.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_8 // nolint
4+
package v1_8 //nolint
55

66
import (
77
"fmt"

models/migrations/v1_8/v77.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2019 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_8 // nolint
4+
package v1_8 //nolint
55

66
import (
77
"xorm.io/xorm"

models/migrations/v1_8/v78.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2019 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_8 // nolint
4+
package v1_8 //nolint
55

66
import (
77
"code.gitea.io/gitea/models/migrations/base"

models/migrations/v1_8/v79.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2019 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_8 // nolint
4+
package v1_8 //nolint
55

66
import (
77
"code.gitea.io/gitea/modules/setting"

models/migrations/v1_8/v80.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2019 The Gitea Authors. All rights reserved.
22
// SPDX-License-Identifier: MIT
33

4-
package v1_8 // nolint
4+
package v1_8 //nolint
55

66
import "xorm.io/xorm"
77

0 commit comments

Comments
 (0)