use continue instead of else to skip empty lines and comments
parent
f926abe009
commit
d9d1d01958
|
@ -41,7 +41,8 @@ func (r *DriftIgnore) readIgnoreFile() error {
|
|||
logrus.WithFields(logrus.Fields{
|
||||
"line": line,
|
||||
}).Debug("Skipped comment or empty line")
|
||||
} else {
|
||||
continue
|
||||
}
|
||||
typeVal := readDriftIgnoreLine(line)
|
||||
nbArgs := len(typeVal)
|
||||
if nbArgs < 2 {
|
||||
|
@ -75,7 +76,6 @@ func (r *DriftIgnore) readIgnoreFile() error {
|
|||
ignoreSublist = append(ignoreSublist, path)
|
||||
r.driftExclusionList[res] = ignoreSublist
|
||||
}
|
||||
}
|
||||
|
||||
if err := scanner.Err(); err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue