Skip to content

Commit

Permalink
Enable nolintlint (woodpecker-ci#3158)
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerty287 authored and fernandrone committed Feb 1, 2024
1 parent a2488e1 commit 67a5a9f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ linters:
- unparam
- wastedassign
- whitespace
- nolintlint

run:
timeout: 15m
Expand Down
6 changes: 3 additions & 3 deletions pipeline/frontend/yaml/compiler/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (err *ErrExtraHostFormat) Error() string {
}

func (*ErrExtraHostFormat) Is(target error) bool {
_, ok := target.(*ErrExtraHostFormat) //nolint:errorlint
_, ok := target.(*ErrExtraHostFormat)
return ok
}

Expand All @@ -39,7 +39,7 @@ func (err *ErrStepMissingDependency) Error() string {
}

func (*ErrStepMissingDependency) Is(target error) bool {
_, ok := target.(*ErrStepMissingDependency) //nolint:errorlint
_, ok := target.(*ErrStepMissingDependency)
return ok
}

Expand All @@ -52,6 +52,6 @@ func (err *ErrStepDependencyCycle) Error() string {
}

func (*ErrStepDependencyCycle) Is(target error) bool {
_, ok := target.(*ErrStepDependencyCycle) //nolint:errorlint
_, ok := target.(*ErrStepDependencyCycle)
return ok
}
4 changes: 2 additions & 2 deletions server/forge/types/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (err *ErrIgnoreEvent) Error() string {
}

func (*ErrIgnoreEvent) Is(target error) bool {
_, ok := target.(*ErrIgnoreEvent) //nolint:errorlint
_, ok := target.(*ErrIgnoreEvent)
return ok
}

Expand All @@ -67,6 +67,6 @@ func (m *ErrConfigNotFound) Error() string {
}

func (*ErrConfigNotFound) Is(target error) bool {
_, ok := target.(*ErrConfigNotFound) //nolint:errorlint
_, ok := target.(*ErrConfigNotFound)
return ok
}
8 changes: 4 additions & 4 deletions server/pipeline/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ func (e ErrNotFound) Error() string {
}

func (e ErrNotFound) Is(target error) bool {
_, ok := target.(ErrNotFound) //nolint:errorlint
_, ok := target.(ErrNotFound)
if !ok {
_, ok = target.(*ErrNotFound) //nolint:errorlint
_, ok = target.(*ErrNotFound)
}
return ok
}
Expand All @@ -41,9 +41,9 @@ func (e ErrBadRequest) Error() string {
}

func (e ErrBadRequest) Is(target error) bool {
_, ok := target.(ErrBadRequest) //nolint:errorlint
_, ok := target.(ErrBadRequest)
if !ok {
_, ok = target.(*ErrBadRequest) //nolint:errorlint
_, ok = target.(*ErrBadRequest)
}
return ok
}
Expand Down

0 comments on commit 67a5a9f

Please sign in to comment.