From f4362f57d38711f913f2c917dbe7b74079510ca2 Mon Sep 17 00:00:00 2001 From: Michael Sverdlov Date: Thu, 18 Jan 2024 19:04:04 +0200 Subject: [PATCH] update deps --- .github/workflows/analysis.yml | 35 ++++++++++++++++----------------- parallel/bounded_runner_test.go | 8 ++++---- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index b47f81b..1d2b086 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -7,37 +7,36 @@ on: - "**" pull_request: jobs: - go-analysis: + Static-Check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout Source + uses: actions/checkout@v3 - - name: Setup Go - uses: actions/setup-go@v5 + - name: Install Go + uses: actions/setup-go@v3 with: go-version: 1.20.x - cache: false - name: Static Code Analysis uses: golangci/golangci-lint-action@v3 with: args: | - --timeout 5m --out-${NO_FUTURE}format colored-line-number --enable gosec,errcheck,gosimple,govet,ineffassign,staticcheck,typecheck,unused,gocritic,asasalint,asciicheck,errchkjson,exportloopref,forcetypeassert,makezero,nilerr,unparam,unconvert,wastedassign,usestdlibvars + --timeout 5m --out-${NO_FUTURE}format colored-line-number --enable errcheck,gosimple,govet,ineffassign,staticcheck,typecheck,unused,gocritic,asasalint,asciicheck,errchkjson,exportloopref,forcetypeassert,makezero,nilerr,unparam,unconvert,wastedassign,usestdlibvars - bash-analysis: + + Go-Sec: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout Source + uses: actions/checkout@v3 - - name: Run ShellCheck - uses: ludeeus/action-shellcheck@master + - name: Install Go + uses: actions/setup-go@v3 with: - ignore_paths: "*test*" - - check-spelling: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 + go-version: 1.20.x - - name: Check spelling - uses: crate-ci/typos@master + - name: Run Gosec Security Scanner + uses: securego/gosec@v2 + with: + args: -exclude G204,G301,G302,G304,G306 -tests -exclude-dir \.*test\.* ./... \ No newline at end of file diff --git a/parallel/bounded_runner_test.go b/parallel/bounded_runner_test.go index a13ca9d..0126dca 100644 --- a/parallel/bounded_runner_test.go +++ b/parallel/bounded_runner_test.go @@ -139,10 +139,10 @@ func TestFailFastOnTaskError(t *testing.T) { wg.Wait() checkResult(expectedTotal, results, t) - //TODO: Fix this test - //This test is fragile since 1 or more goroutines may be executing and failing fast in parallel, - //calling the error handler and increasing the result. So we cannot use accurate comparison. - //Here we only take care of uo to 1 additional concurrent failfast. + // TODO: Fix this test + // This test is fragile since 1 or more goroutines may be executing and failing fast in parallel, + // calling the error handler and increasing the result. So we cannot use accurate comparison. + // Here we only take care of uo to 1 additional concurrent failfast. errTotal := 0 for { err := errorsQueue.GetError()