Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion mod/tigron/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ linters:
- "fmt.Fprintln"
- "fmt.Fprintf"
- name: redundant-test-main-exit
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line can be removed

disabled: true
- name: enforce-switch-style
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line can be removed

disabled: true
- name: var-naming
Expand Down
14 changes: 1 addition & 13 deletions mod/tigron/internal/com/package_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ import (
)

func TestMain(m *testing.M) {
// Prep exit code
exitCode := 0
defer func() { os.Exit(exitCode) }()

var (
snapFile *os.File
before, after []byte
Expand All @@ -39,11 +35,7 @@ func TestMain(m *testing.M) {
before, _ = highk.SnapshotOpenFiles(snapFile)
}

exitCode = m.Run()

if exitCode != 0 {
return
}
m.Run()

if os.Getenv("HIGHK_EXPERIMENTAL_FD") != "" {
after, _ = highk.SnapshotOpenFiles(snapFile)
Expand All @@ -55,15 +47,11 @@ func TestMain(m *testing.M) {
for _, file := range diff {
fmt.Fprintln(os.Stderr, file)
}

exitCode = 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is irrelevant to redundant-test-main-exit

}
}

if err := highk.FindGoRoutines(); err != nil {
fmt.Fprintln(os.Stderr, "Leaking go routines")
fmt.Fprintln(os.Stderr, err.Error())

exitCode = 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is irrelevant to redundant-test-main-exit

}
}
14 changes: 1 addition & 13 deletions mod/tigron/test/package_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ import (
)

func TestMain(m *testing.M) {
// Prep exit code
exitCode := 0
defer func() { os.Exit(exitCode) }()

var (
snapFile *os.File
before, after []byte
Expand All @@ -39,11 +35,7 @@ func TestMain(m *testing.M) {
before, _ = highk.SnapshotOpenFiles(snapFile)
}

exitCode = m.Run()

if exitCode != 0 {
return
}
m.Run()

if os.Getenv("HIGHK_EXPERIMENTAL_FD") != "" {
after, _ = highk.SnapshotOpenFiles(snapFile)
Expand All @@ -55,15 +47,11 @@ func TestMain(m *testing.M) {
for _, file := range diff {
fmt.Fprintln(os.Stderr, file)
}

exitCode = 1
Copy link
Member

@AkihiroSuda AkihiroSuda Sep 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is irrelevant to redundant-test-main-exit

}
}

if err := highk.FindGoRoutines(); err != nil {
fmt.Fprintln(os.Stderr, "Leaking go routines")
fmt.Fprintln(os.Stderr, os.Stderr, err.Error())

exitCode = 1
Copy link
Member

@AkihiroSuda AkihiroSuda Sep 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is irrelevant to redundant-test-main-exit

}
}