Skip to content

Commit

Permalink
fix formatting of nolint tags
Browse files Browse the repository at this point in the history
Also replacing some of them, as there's more linters that check for this
now (revive being one of them), so "fixing" them prevents having to add
more linters to the list.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Oct 4, 2022
1 parent b9a752f commit f0f4764
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions assert/cmd/gty-migrate-from-testify/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ type call struct {

func (c call) String() string {
buf := new(bytes.Buffer)
//nolint: errcheck
format.Node(buf, token.NewFileSet(), c.expr)
_ = format.Node(buf, token.NewFileSet(), c.expr)
return buf.String()
}

Expand Down
2 changes: 1 addition & 1 deletion assert/cmp/compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ type causer interface {
}

func formatErrorMessage(err error) string {
//nolint: errorlint // unwrapping is not appropriate here
//nolint:errorlint // unwrapping is not appropriate here
if _, ok := err.(causer); ok {
return fmt.Sprintf("%q\n%+v", err, err)
}
Expand Down
6 changes: 2 additions & 4 deletions fs/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ func (f *File) Path() string {

// Remove the file
func (f *File) Remove() {
//nolint: errcheck
os.Remove(f.path)
_ = os.Remove(f.path)
}

// Dir is a temporary directory
Expand Down Expand Up @@ -106,8 +105,7 @@ func (d *Dir) Path() string {

// Remove the directory
func (d *Dir) Remove() {
//nolint: errcheck
os.RemoveAll(d.path)
_ = os.RemoveAll(d.path)
}

// Join returns a new path with this directory as the base of the path
Expand Down

0 comments on commit f0f4764

Please sign in to comment.