Skip to content

Fix non-idiomatic boolean comparisons #16

@mirkoboehm

Description

@mirkoboehm

Problem

Code uses == true and == false comparisons instead of idiomatic Go style.

Locations

  • pkg/shell/shell.go:86 - if beginFound == false
  • pkg/junitxml/writer_test.go:24 - if isSet == true

Fix

Use idiomatic Go boolean expressions:

// Before
if beginFound == false {
if isSet == true {

// After
if !beginFound {
if isSet {

Priority

Low - Code style

Metadata

Metadata

Assignees

Labels

code-styleCode style and idioms

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions