use fmt and errors pkgs for lint files

Signed-off-by: James Sheppard <jgsheppa@protonmail.com>
pull/12063/head
James Sheppard 2 years ago
parent 05f02ceafd
commit c39d980ebf

@ -205,7 +205,7 @@ func validateAllowedExtension(fileName string) error {
}
}
return errors.Errorf("file extension '%s' not valid. Valid extensions are .yaml, .yml, .tpl, or .txt", ext)
return fmt.Errorf("file extension '%s' not valid. Valid extensions are .yaml, .yml, .tpl, or .txt", ext)
}
func validateYamlContent(err error) error {

@ -17,6 +17,7 @@ limitations under the License.
package rules
import (
"fmt"
"os"
"path/filepath"
@ -54,7 +55,7 @@ func ValuesWithOverrides(linter *support.Linter, values map[string]interface{})
func validateValuesFileExistence(valuesPath string) error {
_, err := os.Stat(valuesPath)
if err != nil {
return errors.Errorf("file does not exist")
return fmt.Errorf("file does not exist")
}
return nil
}

@ -17,9 +17,8 @@ limitations under the License.
package support
import (
"errors"
"testing"
"github.com/pkg/errors"
)
var linter = Linter{}

Loading…
Cancel
Save