Skip to content

Commit

Permalink
Update go dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed Dec 8, 2022
1 parent 0a85537 commit b7125c8
Show file tree
Hide file tree
Showing 44 changed files with 71 additions and 67 deletions.
34 changes: 17 additions & 17 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
linters:
enable:
- gosimple
- deadcode
- typecheck
- govet
- errcheck
- staticcheck
- unused
- structcheck
- varcheck
- bidichk
# - deadcode # deprecated - https://github.com/golangci/golangci-lint/issues/1841
- depguard
- dupl
#- gocyclo # The cyclomatic complexety of a lot of functions is too high, we should refactor those another time.
- gofmt
- errcheck
- gocritic
- bidichk
- ineffassign
- revive
# - gocyclo # The cyclomatic complexety of a lot of functions is too high, we should refactor those another time.
- gofmt
- gofumpt
- depguard
- gosimple
- govet
- ineffassign
- nakedret
- unconvert
- wastedassign
- nolintlint
- revive
- staticcheck
# - structcheck # deprecated - https://github.com/golangci/golangci-lint/issues/1841
- stylecheck
- typecheck
- unconvert
- unused
# - varcheck # deprecated - https://github.com/golangci/golangci-lint/issues/1841
# - wastedassign # disabled - https://github.com/golangci/golangci-lint/issues/2649
enable-all: false
disable-all: true
fast: false
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ COMMA := ,
XGO_VERSION := go-1.19.x

AIR_PACKAGE ?= github.com/cosmtrek/air@v1.40.4
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@2.5.0
ERRCHECK_PACKAGE ?= github.com/kisielk/errcheck@v1.6.1
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.3.1
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.47.0
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@2.6.0
ERRCHECK_PACKAGE ?= github.com/kisielk/errcheck@v1.6.2
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.4.0
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.1
GXZ_PAGAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.10
MISSPELL_PACKAGE ?= github.com/client9/misspell/cmd/misspell@v0.3.4
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.30.0
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.30.3
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1.3.0
GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1.5.0
GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@latest

DOCKER_IMAGE ?= gitea/gitea
Expand Down
6 changes: 4 additions & 2 deletions models/db/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ type contextKey struct {
}

// enginedContextKey is a context key. It is used with context.Value() to get the current Engined for the context
var enginedContextKey = &contextKey{"engined"}
var _ Engined = &Context{}
var (
enginedContextKey = &contextKey{"engined"}
_ Engined = &Context{}
)

// Context represents a db context
type Context struct {
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_17/main_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2021 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_17 // nolint
package v1_17 //nolint

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_17/v211.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_17 // nolint
package v1_17 //nolint

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_17/v212.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_17 // nolint
package v1_17 //nolint

import (
"code.gitea.io/gitea/modules/timeutil"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_17/v213.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_17 // nolint
package v1_17 //nolint

import (
"xorm.io/xorm"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_17/v214.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_17 // nolint
package v1_17 //nolint

import (
"xorm.io/xorm"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_17/v215.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_17 // nolint
package v1_17 //nolint

import (
"code.gitea.io/gitea/models/pull"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_17/v216.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_17 // nolint
package v1_17 //nolint

// This migration added non-ideal indices to the action table which on larger datasets slowed things down
// it has been superceded by v218.go
2 changes: 1 addition & 1 deletion models/migrations/v1_17/v217.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_17 // nolint
package v1_17 //nolint

import (
"code.gitea.io/gitea/modules/setting"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_17/v218.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_17 // nolint
package v1_17 //nolint

import (
"code.gitea.io/gitea/modules/setting"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_17/v219.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_17 // nolint
package v1_17 //nolint

import (
"time"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_17/v220.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_17 // nolint
package v1_17 //nolint

import (
packages_model "code.gitea.io/gitea/models/packages"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_17/v221.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_17 // nolint
package v1_17 //nolint

import (
"encoding/base32"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_17/v221_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_17 // nolint
package v1_17 //nolint

import (
"encoding/base32"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_17/v222.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_17 // nolint
package v1_17 //nolint

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_17/v223.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_17 // nolint
package v1_17 //nolint

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_18/main_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2021 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_18 // nolint
package v1_18 //nolint

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_18/v224.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_18 // nolint
package v1_18 //nolint

import (
"xorm.io/xorm"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_18/v225.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_18 // nolint
package v1_18 //nolint

import (
"code.gitea.io/gitea/modules/setting"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_18/v226.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_18 // nolint
package v1_18 //nolint

import (
"xorm.io/builder"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_18/v227.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_18 // nolint
package v1_18 //nolint

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_18/v228.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_18 // nolint
package v1_18 //nolint

import (
"code.gitea.io/gitea/modules/timeutil"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_18/v230.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_18 // nolint
package v1_18 //nolint

import (
"xorm.io/xorm"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_19/main_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2021 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_19 // nolint
package v1_19 //nolint

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_19/v232.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_19 // nolint
package v1_19 //nolint

import (
"code.gitea.io/gitea/modules/setting"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_6/v70.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2018 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_6 // nolint
package v1_6 //nolint

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_6/v71.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2018 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_6 // nolint
package v1_6 //nolint

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_6/v72.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2018 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_6 // nolint
package v1_6 //nolint

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_7/v73.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2018 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_7 // nolint
package v1_7 //nolint

import (
"xorm.io/xorm"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_7/v74.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2018 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_7 // nolint
package v1_7 //nolint

import "xorm.io/xorm"

Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_7/v75.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2018 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_7 // nolint
package v1_7 //nolint

import (
"xorm.io/builder"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_8/v76.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2018 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_8 // nolint
package v1_8 //nolint

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_8/v77.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2019 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_8 // nolint
package v1_8 //nolint

import (
"xorm.io/xorm"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_8/v78.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2019 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_8 // nolint
package v1_8 //nolint

import (
"code.gitea.io/gitea/models/migrations/base"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_8/v79.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2019 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_8 // nolint
package v1_8 //nolint

import (
"code.gitea.io/gitea/modules/setting"
Expand Down
2 changes: 1 addition & 1 deletion models/migrations/v1_8/v80.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2019 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package v1_8 // nolint
package v1_8 //nolint

import "xorm.io/xorm"

Expand Down
Loading

0 comments on commit b7125c8

Please sign in to comment.