Skip to content

Commit

Permalink
Fix golint error
Browse files Browse the repository at this point in the history
SKip type conversion golint warning G115 as it is
breaking the CI
  • Loading branch information
piyush-garg authored and tekton-robot committed Aug 26, 2024
1 parent 8dd3404 commit 8fa0a32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ func InitParams(p cli.Params, cmd *cobra.Command) error {
p.SetNoColour(nocolourFlag)

// Make sure we set as Nocolour if we don't have a terminal (ie redirection)
// nolint
// this conversion is throwing error for golangci-lint G115
if !term.IsTerminal(int(os.Stdout.Fd())) {
p.SetNoColour(true)
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/formatted/color.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ type atomicCounter struct {
func (c *atomicCounter) next() int {
v := atomic.AddUint32(&c.value, 1)
next := int(v-1) % c.threshold
// nolint
// this conversion is throwing error for golangci-lint G115
atomic.CompareAndSwapUint32(&c.value, uint32(c.threshold), 0)
return next

Expand Down

0 comments on commit 8fa0a32

Please sign in to comment.