diff --git a/cmd/substation/test.go b/cmd/substation/test.go index be7263b7..0a4bef1a 100644 --- a/cmd/substation/test.go +++ b/cmd/substation/test.go @@ -203,6 +203,8 @@ func testFile(arg string, extVars map[string]string) error { fileName := filepath.Base(arg) _ = os.Chdir(filepath.Dir(arg)) + // The default case is a no-op -- the file is skipped because + // it cannot be tested. switch filepath.Ext(fileName) { case ".jsonnet", ".libsonnet": // If the Jsonnet cannot compile, then the file is invalid. diff --git a/cmd/substation/vet.go b/cmd/substation/vet.go index ab7dab7b..671ade42 100644 --- a/cmd/substation/vet.go +++ b/cmd/substation/vet.go @@ -104,6 +104,8 @@ func vetFile(arg string, extVars map[string]string) error { fileName := filepath.Base(arg) _ = os.Chdir(filepath.Dir(arg)) + // The default case is a no-op -- the file is skipped because + // it cannot be vetted. switch filepath.Ext(fileName) { case ".jsonnet", ".libsonnet": mem, err := compileFile(fileName, extVars)