Skip to content

Commit 8367acc

Browse files
committed
add trace logs to ok/err/project lint tests
1 parent 7a4614f commit 8367acc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

linter_test.go

+7
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ func TestLinterLintOK(t *testing.T) {
7070
config := Config{}
7171
linter.defaultConfig = &config
7272

73+
t.Log("Linting workflow file", f)
7374
errs, err := linter.LintFile(f, proj)
7475
if err != nil {
7576
t.Fatal(err)
@@ -104,6 +105,9 @@ func testFindAllWorkflowsInDir(subdir string) (string, []string, error) {
104105
}
105106

106107
func checkErrors(t *testing.T, outfile string, errs []*Error) {
108+
t.Helper()
109+
t.Log("Checking errors with", outfile)
110+
107111
expected := []string{}
108112
{
109113
f, err := os.Open(outfile)
@@ -168,6 +172,7 @@ func TestLinterLintError(t *testing.T) {
168172
base := strings.TrimSuffix(infile, filepath.Ext(infile))
169173
testName := filepath.Base(base)
170174
t.Run(subdir+"/"+testName, func(t *testing.T) {
175+
t.Log("Linting workflow file", infile)
171176
b, err := os.ReadFile(infile)
172177
if err != nil {
173178
panic(err)
@@ -317,6 +322,8 @@ func TestLinterLintProject(t *testing.T) {
317322
name := info.Name()
318323
t.Run("project/"+name, func(t *testing.T) {
319324
repo := filepath.Join(root, name)
325+
t.Log("Linting project at", repo)
326+
320327
opts := LinterOptions{
321328
WorkingDir: repo,
322329
}

0 commit comments

Comments
 (0)