Skip to content

Commit

Permalink
Merge pull request #275 from alexandear/refactor/inc-dec
Browse files Browse the repository at this point in the history
refactor: use increment instead of `+= 1`
  • Loading branch information
loeffel-io authored Dec 11, 2024
2 parents 61ffb56 + bafbb09 commit 32c91a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/linter/linter.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ func (linter *Linter) validateDir(index config.RuleIndex, path string, validate

if !ruleDir.GetExclusive() {
rulesMutex.Lock()
rulesNonExclusiveCount += 1
rulesNonExclusiveCount++
if !valid {
rulesNonExclusiveError += 1
rulesNonExclusiveError++
}
rulesMutex.Unlock()
}
Expand Down Expand Up @@ -184,9 +184,9 @@ func (linter *Linter) validateFile(index config.RuleIndex, path string, validate

if !ruleFile.GetExclusive() {
rulesMutex.Lock()
rulesNonExclusiveCount += 1
rulesNonExclusiveCount++
if !valid {
rulesNonExclusiveError += 1
rulesNonExclusiveError++
}
rulesMutex.Unlock()
}
Expand Down

0 comments on commit 32c91a9

Please sign in to comment.