Skip to content

Commit b3457a2

Browse files
committed
Reduce verbosity of Boolean comparisons
1 parent 9bde283 commit b3457a2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

check/check.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ func shouldRun(checkConfiguration checkconfigurations.Type, currentProject proje
6262
}
6363

6464
for _, disableMode := range checkConfiguration.DisableModes {
65-
if configurationCheckModes[disableMode] == true {
65+
if configurationCheckModes[disableMode] {
6666
return false, nil
6767
}
6868
}
6969

7070
for _, enableMode := range checkConfiguration.EnableModes {
71-
if configurationCheckModes[enableMode] == true {
71+
if configurationCheckModes[enableMode] {
7272
return true, nil
7373
}
7474
}

check/checklevel/checklevel.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ const (
2525
func CheckLevel(checkConfiguration checkconfigurations.Type) (Type, error) {
2626
configurationCheckModes := configuration.CheckModes(checkConfiguration.ProjectType)
2727
for _, errorMode := range checkConfiguration.ErrorModes {
28-
if configurationCheckModes[errorMode] == true {
28+
if configurationCheckModes[errorMode] {
2929
return Error, nil
3030
}
3131
}
3232

3333
for _, warningMode := range checkConfiguration.WarningModes {
34-
if configurationCheckModes[warningMode] == true {
34+
if configurationCheckModes[warningMode] {
3535
return Warning, nil
3636
}
3737
}
3838

3939
for _, infoMode := range checkConfiguration.InfoModes {
40-
if configurationCheckModes[infoMode] == true {
40+
if configurationCheckModes[infoMode] {
4141
return Info, nil
4242
}
4343
}

0 commit comments

Comments
 (0)