skip warnings on commented out and empty lines
parent
4e486b3b07
commit
7b2db4ca87
|
@ -39,6 +39,9 @@ func (r *DriftIgnore) readIgnoreFile() error {
|
|||
line := scanner.Text()
|
||||
typeVal := readDriftIgnoreLine(line)
|
||||
nbArgs := len(typeVal)
|
||||
if nbArgs == 0 || strings.HasPrefix(line, "#") {
|
||||
continue // skip empty or commented out lines
|
||||
} else {
|
||||
if nbArgs < 2 {
|
||||
logrus.WithFields(logrus.Fields{
|
||||
"line": line,
|
||||
|
@ -70,6 +73,7 @@ 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