You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test functions should use testing.T.{Setenv,Chdir} instead; these helpers will correctly restore the previous value with t.Cleanup() and prevent t.Parallel()
I can't really think of any scenario where you would call the os versions in a test?
Possibly also os.TempDir() and os.{CreateTemp,MkdirTemp}() (when called with the default directory or os.TempDir())?
Activity
ccoVeille commentedon Mar 14, 2026
For record: @ldez usetesting already reports it 🥰 (and way more)
It's available in golangci-lint via configuration