From 7f29c2696dc0f205321165008fd6a3ffa91df9bc Mon Sep 17 00:00:00 2001 From: Armand Grillet <2117580+armandgrillet@users.noreply.github.com> Date: Sat, 21 May 2022 12:14:58 +0200 Subject: [PATCH] Add nolint to two lines in fs.go (#49357) --- pkg/build/fs.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/build/fs.go b/pkg/build/fs.go index fe1eaba2577..65c107b1513 100644 --- a/pkg/build/fs.go +++ b/pkg/build/fs.go @@ -34,7 +34,7 @@ func shaDir(dir string) error { } func shaFile(file string) error { - // Can ignore gosec G304 because this function is not used in Grafana, only in the build process. + // Ignore gosec G304 as this function is only used in the build process. //nolint:gosec r, err := os.Open(file) if err != nil { @@ -49,6 +49,8 @@ func shaFile(file string) error { return err } + // Ignore gosec G304 as this function is only used in the build process. + //nolint:gosec out, err := os.Create(file + ".sha256") if err != nil { return err @@ -63,7 +65,7 @@ func shaFile(file string) error { } func md5File(file string) error { - // Can ignore gosec G304 because this function is not used in Grafana, only in the build process. + // Ignore gosec G304 as this function is only used in the build process. //nolint:gosec fd, err := os.Open(file) if err != nil { @@ -77,6 +79,8 @@ func md5File(file string) error { return err } + // Ignore gosec G304 as this function is only used in the build process. + //nolint:gosec out, err := os.Create(file + ".md5") if err != nil { return err