diff --git a/.golangci.yml b/.golangci.yml index fbba11fa6..1ba25cf53 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -84,7 +84,6 @@ linters: allow-whole-block: true disable: - assign - - err - expr default: all diff --git a/cli/command_mount.go b/cli/command_mount.go index a95972417..bdabae22d 100644 --- a/cli/command_mount.go +++ b/cli/command_mount.go @@ -82,7 +82,6 @@ func (c *commandMount) run(ctx context.Context, rep repo.Repository) error { FuseAllowNonEmptyMount: c.mountFuseAllowNonEmptyMount, PreferWebDAV: c.mountPreferWebDAV, }) - if mountErr != nil { return errors.Wrap(mountErr, "mount error") } diff --git a/cli/command_snapshot_create.go b/cli/command_snapshot_create.go index d0c90f72c..6a9a994fe 100644 --- a/cli/command_snapshot_create.go +++ b/cli/command_snapshot_create.go @@ -499,7 +499,6 @@ func (c *commandSnapshotCreate) getContentToSnapshot(ctx context.Context, dir st func parseFullSource(str, hostname, username string) (snapshot.SourceInfo, error) { sourceInfo, err := snapshot.ParseSourceInfo(str, hostname, username) - if err != nil { return snapshot.SourceInfo{}, errors.Wrapf(err, "not a valid source %v", str) } else if sourceInfo.Host == "" || sourceInfo.UserName == "" || sourceInfo.Path == "" { diff --git a/internal/passwordpersist/passwordpersist_multiple.go b/internal/passwordpersist/passwordpersist_multiple.go index 575a7406c..49448020e 100644 --- a/internal/passwordpersist/passwordpersist_multiple.go +++ b/internal/passwordpersist/passwordpersist_multiple.go @@ -34,7 +34,6 @@ func (m Multiple) GetPassword(ctx context.Context, configFile string) (string, e func (m Multiple) PersistPassword(ctx context.Context, configFile, password string) error { for _, s := range m { err := s.PersistPassword(ctx, configFile, password) - if err == nil { return nil } diff --git a/internal/wcmatch/wcmatch_test.go b/internal/wcmatch/wcmatch_test.go index c8ab1f4bd..30aa06461 100644 --- a/internal/wcmatch/wcmatch_test.go +++ b/internal/wcmatch/wcmatch_test.go @@ -51,7 +51,6 @@ func TestMatchWithBaseDir(t *testing.T) { } matcher, err := NewWildcardMatcher(tc.pattern, BaseDir(tc.baseDir)) - if err != nil { t.Errorf("(%v) unexpected error returned for pattern %#v: %v", i, tc.pattern, err) } else {