Skip to content

Commit

Permalink
Update lint configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
System-Glitch committed Nov 22, 2024
1 parent 89535ea commit 2a32465
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: ["1.22"]
go: ["1.23"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
Expand All @@ -31,9 +31,9 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version: "1.23"
cache: false
- name: Run lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.58
version: v1.62
21 changes: 20 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ linters-settings:
disable:
- shadow
enable-all: true
testifylint:
disable:
- require-error
- error-nil
- formatter
- encoded-compare
revive:
rules:
- name: var-naming
arguments:
- [] # AllowList
- ["DTO"] # DenyList
- name: unused-parameter
disabled: false

linters:
enable:
Expand All @@ -19,12 +33,14 @@ linters:
- govet
- unused
- errcheck
- exportloopref
- copyloopvar
- gosimple
- ineffassign
- staticcheck
- testifylint
- whitespace
- bodyclose
- inamedparam
disable-all: false
fast: false

Expand All @@ -34,6 +50,9 @@ issues:
max-same-issues: 0
exclude-dirs:
- .github
- .storage
- .vscode
- resources
exclude:
- should have a package comment
- for error assertions use require
Expand Down
1 change: 0 additions & 1 deletion http/middleware/owner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ func (s ownerServiceMock) IsOwner(_ context.Context, _, _ uint) (bool, error) {
}

func TestOwner(t *testing.T) {

cases := []struct {
service ownerServiceMock
articleID string
Expand Down
1 change: 0 additions & 1 deletion http/validation/password_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
)

func TestPasswordValidator(t *testing.T) {

cases := []struct {
value any
want bool
Expand Down
4 changes: 2 additions & 2 deletions service/user/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ type Repository interface {

type StorageService interface {
GetFS() fs.StatFS
SaveAvatar(fsutil.File) (string, error)
Delete(string) error
SaveAvatar(file fsutil.File) (string, error)
Delete(path string) error
}

type Service struct {
Expand Down

0 comments on commit 2a32465

Please sign in to comment.