From 67ec1da96441ed538cd9faca0b01ff04b326d970 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Ruel Date: Wed, 4 Sep 2024 14:54:51 -0400 Subject: [PATCH] Silence linting --- .github/workflows/test.yml | 2 +- unicornhd/unicornhd_test.go | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2f21bb0..bf74aa4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -141,7 +141,7 @@ jobs: run: staticcheck -checks inherit,-SA1019 ./... - name: 'Check: gosec' if: always() - run: gosec -fmt=golint -quiet ./... + run: gosec -fmt=golint -quiet -exclude=G115 ./... # The following checks are not dependent on the OS or go build tags. Only # run them on ubuntu-latest since it's the fastest one. - name: 'Check: no executable was committed (ubuntu)' diff --git a/unicornhd/unicornhd_test.go b/unicornhd/unicornhd_test.go index 5af8284..1f1fd2d 100644 --- a/unicornhd/unicornhd_test.go +++ b/unicornhd/unicornhd_test.go @@ -273,20 +273,11 @@ func TestDrawWritesSequenceImageToSpi(t *testing.T) { for x := 0; x < width; x++ { r := c c++ - if c > 255 { - c = 0 - } // Blue is set before Green on purpose to avoid having a straight sequence. b := c c++ - if c > 255 { - c = 0 - } g := c c++ - if c > 255 { - c = 0 - } clr := color.RGBA{r, g, b, 255} img.Set(x, y, clr) }