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 { func validateYamlContent(err error) error {

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

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

Loading…
Cancel
Save