Skip to content

Commit 7424fff

Browse files
[no-relnote] Add E2E tests for systemd unit
Signed-off-by: Carlos Eduardo Arango Gutierrez <[email protected]>
1 parent f4a5548 commit 7424fff

File tree

189 files changed

+42812
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+42812
-15
lines changed

tests/e2e/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ GINKGO_BIN := $(CURDIR)/bin/ginkgo
2424
# current available tests:
2525
# - nvidia-container-cli
2626
# - docker
27+
# - nvidia-cdi-refresh
2728
GINKGO_FOCUS ?=
2829

2930
test: $(GINKGO_BIN)

tests/e2e/e2e_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ var (
4343
sshUser string
4444
sshHost string
4545
sshPort string
46+
47+
testContainerName = "ctk-e2e-test-container"
4648
)
4749

4850
func TestMain(t *testing.T) {
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
/*
2+
* Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package e2e
18+
19+
import (
20+
"context"
21+
"fmt"
22+
23+
. "github.com/onsi/ginkgo/v2"
24+
. "github.com/onsi/gomega"
25+
"sigs.k8s.io/kind/pkg/build/nodeimage"
26+
)
27+
28+
const (
29+
nvidiaCdiRefreshServiceTestTemplate = `
30+
systemctl status nvidia-cdi-refresh.path | grep "Loaded: loaded"
31+
systemctl status nvidia-cdi-refresh.service | grep "Loaded: loaded"
32+
33+
# is /var/run/cdi/nvidia.yaml exists? and exit with 0 if it does not exist
34+
if [ ! -f /var/run/cdi/nvidia.yaml ]; then
35+
echo "nvidia.yaml file does not exist"
36+
exit 1
37+
fi
38+
39+
# generate the nvidia.yaml file
40+
nvidia-ctk cdi generate --output=/tmp/nvidia.yaml
41+
42+
# diff the generated file with the one in /var/run/cdi/nvidia.yaml and exit with 0 if they are the same
43+
if ! diff /var/run/cdi/nvidia.yaml /tmp/nvidia.yaml; then
44+
echo "nvidia.yaml file is different"
45+
exit 1
46+
fi
47+
48+
# remove the generated file
49+
rm /var/run/cdi/nvidia.yaml
50+
51+
# Touch the nvidia-ctk binary to change the mtime
52+
# This will trigger the nvidia-cdi-refresh.path unit to call the
53+
# nvidia-cdi-refresh.service unit, simulating a change(update/downgrade) in the nvidia-ctk binary.
54+
touch $(which nvidia-ctk)
55+
56+
# wait for 3 seconds
57+
sleep 3
58+
59+
# Check if the file /var/run/cdi/nvidia.yaml is created
60+
if [ ! -f /var/run/cdi/nvidia.yaml ]; then
61+
echo "nvidia.yaml file is not created after updating the modules.dep file"
62+
exit 1
63+
fi
64+
`
65+
)
66+
67+
var _ = Describe("nvidia-cdi-refresh", Ordered, ContinueOnFailure, Label("systemd-unit"), func() {
68+
var (
69+
nestedContainerRunner Runner
70+
outerContainerImage = nodeimage.DefaultBaseImage
71+
)
72+
73+
BeforeAll(func(ctx context.Context) {
74+
var err error
75+
nestedContainerRunner, err = NewNestedContainerRunner(runner, outerContainerImage, installCTK, imageName+":"+imageTag, testContainerName)
76+
Expect(err).ToNot(HaveOccurred())
77+
})
78+
79+
AfterAll(func(ctx context.Context) {
80+
// Cleanup: remove the container and the temporary script on the host.
81+
// Use || true to ensure cleanup doesn't fail the test
82+
runner.Run(fmt.Sprintf("docker rm -f %s 2>/dev/null || true", testContainerName)) //nolint:errcheck
83+
})
84+
85+
It("should be loaded and the nvidia.yaml file should be generated", func(ctx context.Context) {
86+
// Run the test script in the container.
87+
_, _, err := nestedContainerRunner.Run(nvidiaCdiRefreshServiceTestTemplate)
88+
Expect(err).ToNot(HaveOccurred())
89+
})
90+
})

tests/e2e/nvidia-container-cli_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,12 @@ IN_NS
7272
var _ = Describe("nvidia-container-cli", Ordered, ContinueOnFailure, Label("libnvidia-container"), func() {
7373
var (
7474
nestedContainerRunner Runner
75-
containerName = "node-container-e2e"
7675
hostOutput string
7776
)
7877

7978
BeforeAll(func(ctx context.Context) {
8079
var err error
81-
nestedContainerRunner, err = NewNestedContainerRunner(runner, installCTK, imageName+":"+imageTag, containerName)
80+
nestedContainerRunner, err = NewNestedContainerRunner(runner, "ubuntu", installCTK, imageName+":"+imageTag, testContainerName)
8281
Expect(err).ToNot(HaveOccurred())
8382

8483
// Capture the host GPU list.
@@ -92,7 +91,7 @@ var _ = Describe("nvidia-container-cli", Ordered, ContinueOnFailure, Label("libn
9291
AfterAll(func(ctx context.Context) {
9392
// Cleanup: remove the container and the temporary script on the host.
9493
// Use || true to ensure cleanup doesn't fail the test
95-
runner.Run(fmt.Sprintf("docker rm -f %s 2>/dev/null || true", containerName)) //nolint:errcheck
94+
runner.Run(fmt.Sprintf("docker rm -f %s 2>/dev/null || true", testContainerName)) //nolint:errcheck
9695
})
9796

9897
It("should report the same GPUs inside the container as on the host", func(ctx context.Context) {

tests/e2e/nvidia-container-toolkit_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@ var _ = Describe("docker", Ordered, ContinueOnFailure, func() {
343343
_, _, err := runner.Run("docker pull ubuntu")
344344
Expect(err).ToNot(HaveOccurred())
345345

346-
var tmpDirPath string
347346
// Make test runable from a MacOs hosts.
348347
// On darwin, the temp dir is in /var/folders/.../T/
349348
// We need to convert it to /tmp/...

tests/e2e/runner.go

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,35 @@ const (
3535
{{ range $i, $a := .AdditionalArguments -}}
3636
{{ $a }} \
3737
{{ end -}}
38-
ubuntu sleep infinity`
38+
{{.OuterContainerImage}} sleep infinity`
3939

4040
installDockerTemplate = `
4141
export DEBIAN_FRONTEND=noninteractive
4242
4343
# Add Docker official GPG key:
4444
apt-get update
45-
apt-get install -y ca-certificates curl apt-utils gnupg2
45+
apt-get install -y apt-utils ca-certificates curl gnupg2
4646
install -m 0755 -d /etc/apt/keyrings
47-
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
47+
48+
# Read OS information from /etc/os-release
49+
. /etc/os-release
50+
51+
if [ "${ID}" = "debian" ]; then
52+
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
53+
else
54+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
55+
fi
4856
chmod a+r /etc/apt/keyrings/docker.asc
4957
5058
# Add the repository to Apt sources:
51-
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo \"${UBUNTU_CODENAME:-$VERSION_CODENAME}\") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
59+
if [ "${ID}" = "debian" ]; then
60+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian ${VERSION_CODENAME} stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
61+
else
62+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu ${UBUNTU_CODENAME:-$VERSION_CODENAME} stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
63+
fi
5264
apt-get update
5365
54-
apt-get install -y docker-ce docker-ce-cli containerd.io
66+
apt-get install -y docker-ce docker-ce-cli
5567
5668
# start dockerd in the background
5769
dockerd &
@@ -98,7 +110,6 @@ type nestedContainerRunner struct {
98110
}
99111

100112
type runnerOption func(*remoteRunner)
101-
type nestedContainerOption func(*nestedContainerRunner)
102113

103114
type Runner interface {
104115
Run(script string) (string, string, error)
@@ -146,7 +157,7 @@ func NewRunner(opts ...runnerOption) Runner {
146157
// NewNestedContainerRunner creates a new nested container runner.
147158
// A nested container runs a container inside another container based on a
148159
// given runner (remote or local).
149-
func NewNestedContainerRunner(runner Runner, installCTK bool, image string, containerName string, opts ...nestedContainerOption) (Runner, error) {
160+
func NewNestedContainerRunner(runner Runner, baseImage string, installCTK bool, image string, containerName string) (Runner, error) {
150161
additionalContainerArguments := []string{}
151162

152163
// If a container with the same name exists from a previous test run, remove it first.
@@ -222,6 +233,9 @@ func NewNestedContainerRunner(runner Runner, installCTK bool, image string, cont
222233
}
223234
}
224235

236+
// Mount the /lib/modules directory as a volume to enable the nvidia-cdi-refresh service
237+
additionalContainerArguments = append(additionalContainerArguments, "-v /lib/modules:/lib/modules")
238+
225239
// Launch the container in detached mode.
226240
var outerContainerScriptBuilder strings.Builder
227241
outerContainerTemplate, err := template.New("outerContainer").Parse(outerContainerTemplate)
@@ -231,9 +245,11 @@ func NewNestedContainerRunner(runner Runner, installCTK bool, image string, cont
231245
err = outerContainerTemplate.Execute(&outerContainerScriptBuilder, struct {
232246
ContainerName string
233247
AdditionalArguments []string
248+
OuterContainerImage string
234249
}{
235250
ContainerName: containerName,
236251
AdditionalArguments: additionalContainerArguments,
252+
OuterContainerImage: baseImage,
237253
})
238254
if err != nil {
239255
return nil, fmt.Errorf("failed to execute start container template: %w", err)

tests/go.mod

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,24 @@ require (
99
github.com/onsi/ginkgo/v2 v2.23.4
1010
github.com/onsi/gomega v1.38.0
1111
golang.org/x/crypto v0.41.0
12+
sigs.k8s.io/kind v0.29.0
1213
)
1314

1415
require (
16+
al.essio.dev/pkg/shellescape v1.5.1 // indirect
17+
github.com/BurntSushi/toml v1.4.0 // indirect
18+
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
1519
github.com/go-logr/logr v1.4.2 // indirect
1620
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
1721
github.com/google/go-cmp v0.7.0 // indirect
1822
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect
23+
github.com/pelletier/go-toml v1.9.5 // indirect
24+
github.com/pkg/errors v0.9.1 // indirect
1925
go.uber.org/automaxprocs v1.6.0 // indirect
2026
golang.org/x/net v0.42.0 // indirect
2127
golang.org/x/sys v0.35.0 // indirect
2228
golang.org/x/text v0.28.0 // indirect
2329
golang.org/x/tools v0.35.0 // indirect
2430
gopkg.in/yaml.v3 v3.0.1 // indirect
31+
sigs.k8s.io/yaml v1.4.0 // indirect
2532
)

tests/go.sum

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,38 @@
1+
al.essio.dev/pkg/shellescape v1.5.1 h1:86HrALUujYS/h+GtqoB26SBEdkWfmMI6FubjXlsXyho=
2+
al.essio.dev/pkg/shellescape v1.5.1/go.mod h1:6sIqp7X2P6mThCQ7twERpZTuigpr6KbZWtls1U8I890=
3+
github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0=
4+
github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
15
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
26
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
7+
github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww=
8+
github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4=
39
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
410
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
511
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
612
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
13+
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
714
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
815
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
916
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8=
1017
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA=
18+
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
19+
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
1120
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
1221
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
13-
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
14-
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
22+
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
1523
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
1624
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
25+
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
26+
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
1727
github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus=
1828
github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8=
1929
github.com/onsi/gomega v1.38.0 h1:c/WX+w8SLAinvuKKQFh77WEucCnPk4j2OTUr7lt7BeY=
2030
github.com/onsi/gomega v1.38.0/go.mod h1:OcXcwId0b9QsE7Y49u+BTrL4IdKOBOKnD6VQNTJEB6o=
31+
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
32+
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
33+
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
34+
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
35+
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
2136
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
2237
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
2338
github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g=
@@ -41,7 +56,11 @@ golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw
4156
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
4257
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
4358
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
44-
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
45-
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
59+
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U=
60+
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
4661
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
4762
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
63+
sigs.k8s.io/kind v0.29.0 h1:3TpCsyh908IkXXpcSnsMjWdwdWjIl7o9IMZImZCWFnI=
64+
sigs.k8s.io/kind v0.29.0/go.mod h1:ldWQisw2NYyM6k64o/tkZng/1qQW7OlzcN5a8geJX3o=
65+
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
66+
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Compiled Object files, Static and Dynamic libs (Shared Objects)
2+
*.o
3+
*.a
4+
*.so
5+
6+
# Folders
7+
_obj
8+
_test
9+
10+
# Architecture specific extensions/prefixes
11+
*.[568vq]
12+
[568vq].out
13+
14+
*.cgo1.go
15+
*.cgo2.c
16+
_cgo_defun.c
17+
_cgo_gotypes.go
18+
_cgo_export.*
19+
20+
_testmain.go
21+
22+
*.exe
23+
*.test
24+
*.prof
25+
26+
.idea/
27+
28+
escargs
29+
30+
config.hcl
31+
32+
.DS_Store
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# run:
2+
# # timeout for analysis, e.g. 30s, 5m, default is 1m
3+
# timeout: 5m
4+
5+
linters:
6+
disable-all: true
7+
enable:
8+
- bodyclose
9+
- dogsled
10+
- goconst
11+
- gocritic
12+
- gofmt
13+
- goimports
14+
- gosec
15+
- gosimple
16+
- govet
17+
- ineffassign
18+
- misspell
19+
- prealloc
20+
- exportloopref
21+
- revive
22+
- staticcheck
23+
- stylecheck
24+
- typecheck
25+
- unconvert
26+
- unparam
27+
- unused
28+
- misspell
29+
- wsl
30+
31+
issues:
32+
exclude-rules:
33+
- text: "Use of weak random number generator"
34+
linters:
35+
- gosec
36+
- text: "comment on exported var"
37+
linters:
38+
- golint
39+
- text: "don't use an underscore in package name"
40+
linters:
41+
- golint
42+
- text: "ST1003:"
43+
linters:
44+
- stylecheck
45+
# FIXME: Disabled until golangci-lint updates stylecheck with this fix:
46+
# https://github.com/dominikh/go-tools/issues/389
47+
- text: "ST1016:"
48+
linters:
49+
- stylecheck
50+
51+
linters-settings:
52+
dogsled:
53+
max-blank-identifiers: 3
54+
maligned:
55+
# print struct with more effective memory layout or not, false by default
56+
suggest-new: true
57+
58+
run:
59+
tests: false

0 commit comments

Comments
 (0)