Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maint: Remove false positive linters #538

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions cmd/authd/daemon/export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@
}

// Config returns a DaemonConfig for tests.
//
//nolint:revive // DaemonConfig is a type alias for tests
func (a App) Config() DaemonConfig {

Check failure on line 61 in cmd/authd/daemon/export_test.go

View workflow job for this annotation

GitHub Actions / Go: Code sanity

unexported-return: exported method Config returns unexported type daemon.daemonConfig, which can be annoying to use (revive)
return a.config
}

Expand Down
1 change: 0 additions & 1 deletion internal/services/permissions/export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

type PeerCredsInfo = peerCredsInfo

//nolint:revive // This is a false positive as we returned a typed alias and not the private type.
func NewTestPeerCredsInfo(uid uint32, pid int32) PeerCredsInfo {

Check failure on line 5 in internal/services/permissions/export_test.go

View workflow job for this annotation

GitHub Actions / Go: Code sanity

unexported-return: exported func NewTestPeerCredsInfo returns unexported type permissions.peerCredsInfo, which can be annoying to use (revive)
return PeerCredsInfo{uid: uid, pid: pid}
}

Expand Down
1 change: 0 additions & 1 deletion internal/services/permissions/testutils/permissions.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"fmt"
"strings"

//nolint:revive,nolintlint // needed for go:linkname, but only used in tests. nolintlint as false positive then.
_ "unsafe"

Check failure on line 10 in internal/services/permissions/testutils/permissions.go

View workflow job for this annotation

GitHub Actions / Go: Code sanity

blank-imports: a blank import should be only in a main or test package, or have a comment justifying it (revive)

"github.com/ubuntu/authd/internal/services/permissions"
"github.com/ubuntu/authd/internal/testsdetection"
Expand Down
Loading