unused: ignore false positives

integration/build/build_session_test.go:92:6: func `testBuildWithSession` is unused (unused)
    func testBuildWithSession(t *testing.T, client dclient.APIClient, daemonHost string, dir, dockerfile string) (outStr string) {
         ^
    integration/container/checkpoint_test.go:23:6: func `containerExec` is unused (unused)
    func containerExec(t *testing.T, client client.APIClient, cID string, cmd []string) {
         ^
    integration/network/service_test.go:295:6: func `swarmIngressReady` is unused (unused)
    func swarmIngressReady(client client.NetworkAPIClient) func(log poll.LogT) poll.Result {
         ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7c91fd4240)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2021-04-16 21:39:29 +02:00
parent b6de0ca7c5
commit db7b3f4737
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
3 changed files with 3 additions and 0 deletions

View file

@ -89,6 +89,7 @@ func TestBuildWithSession(t *testing.T) {
assert.Check(t, is.Equal(du.BuilderSize, int64(0)))
}
//nolint:unused // false positive: linter detects this as "unused"
func testBuildWithSession(t *testing.T, client dclient.APIClient, daemonHost string, dir, dockerfile string) (outStr string) {
ctx := context.Background()
sess, err := session.NewSession(ctx, "foo1", "foo")

View file

@ -20,6 +20,7 @@ import (
"gotest.tools/v3/skip"
)
//nolint:unused // false positive: linter detects this as "unused"
func containerExec(t *testing.T, client client.APIClient, cID string, cmd []string) {
t.Logf("Exec: %s", cmd)
ctx := context.Background()

View file

@ -292,6 +292,7 @@ func TestServiceRemoveKeepsIngressNetwork(t *testing.T) {
assert.Assert(t, ok, "ingress-sbox not present in ingress network")
}
//nolint:unused // for some reason, the "unused" linter marks this function as "unused"
func swarmIngressReady(client client.NetworkAPIClient) func(log poll.LogT) poll.Result {
return func(log poll.LogT) poll.Result {
netInfo, err := client.NetworkInspect(context.Background(), ingressNet, types.NetworkInspectOptions{