Skip to content

Commit 796cf1a

Browse files
committed
Reduce verbosity of Boolean comparisons
1 parent 0e9b684 commit 796cf1a

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
@@ -63,13 +63,13 @@ func shouldRun(checkConfiguration checkconfigurations.Type, currentProject proje
6363
}
6464

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

7171
for _, enableMode := range checkConfiguration.EnableModes {
72-
if configurationCheckModes[enableMode] == true {
72+
if configurationCheckModes[enableMode] {
7373
return true, nil
7474
}
7575
}

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)