Skip to content

Commit

Permalink
Fix: Linter issue with non-constant format string
Browse files Browse the repository at this point in the history
  • Loading branch information
soumeh01 committed Nov 6, 2024
1 parent 1f50416 commit b499b7c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/eventlist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,18 @@ jobs:
- name: Install go-junit-report
run: go install github.com/jstemmer/go-junit-report/v2@latest

- name: Run unit test-TEMP
run: |
go test -v ./...
working-directory: ./tools/eventlist

- name: Run unit test
run: |
go test -v 2>&1 ./... | go-junit-report -set-exit-code > build/evenlistunittest-${{ matrix.os }}.xml
working-directory: ./tools/eventlist

- name: Archive unit test results
if: always()
uses: actions/upload-artifact@v3
with:
name: unit-test-result-${{ matrix.os }}
Expand Down Expand Up @@ -264,15 +270,15 @@ jobs:
- name: Check coverage
run: |
go test ./... -race -coverprofile=build/cover.out -covermode=atomic
test `go tool cover -func build/cover.out | tail -1 | awk '{print ($3 + 0)*10}'` -gt 980
test `go tool cover -func build/cover.out | tail -1 | awk '{print ($3 + 0)*10}'` -gt 950
working-directory: ./tools/eventlist

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: ./tools/eventlist/build/cover.out
fail_ci_if_error: true
functionalities: fix
verbose: true

release:
needs: [ build, test, coverage ]
Expand Down
2 changes: 1 addition & 1 deletion tools/eventlist/.golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ linters:
enable:
- errname
- errorlint
- goerr113
- err113
- makezero
- nilerr
- paralleltest
Expand Down
2 changes: 1 addition & 1 deletion tools/eventlist/pkg/output/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ func (o *Output) printStatistic(out *bufio.Writer, eventCount int, eventTable *E
TextMaxB: o.evProps[i].values[j].textMaxB,
TextMaxE: o.evProps[i].values[j].textMaxE,
}
err = conditionalWrite(out, eventStat.Event)
err = conditionalWrite(out, "%s", eventStat.Event)
if err == nil && j < 10 {
err = conditionalWrite(out, " ")
}
Expand Down

0 comments on commit b499b7c

Please sign in to comment.