Fix linting issues

This commit is contained in:
Vivek Lakshmanan 2020-12-02 16:04:14 -08:00
parent 47525eabfa
commit 4f6840ad69
5 changed files with 8 additions and 3 deletions

View file

@ -4,6 +4,8 @@ package python
import "os"
// Check if file supports reparse point in windows.
// This is to trigger a workaround for https://github.com/golang/go/issues/42919
func isReparsePoint(info os.FileInfo) bool {
return false
}

View file

@ -5,6 +5,8 @@ import (
"syscall"
)
// Check if file supports reparse point in windows.
// This is to trigger a workaround for https://github.com/golang/go/issues/42919
func isReparsePoint(info os.FileInfo) bool {
if sys, ok := info.Sys().(*syscall.Win32FileAttributeData); ok {
return sys.FileAttributes&syscall.FILE_ATTRIBUTE_REPARSE_POINT != 0 &&

View file

@ -116,6 +116,7 @@ func TestRunningPipInVirtualEnvironment(t *testing.T) {
WithDir(tempdir),
WithEnv(ActivateVirtualEnv(os.Environ(), venvDir)),
)
assert.NoError(t, err)
asWrappedCmd := pipCmd.(*wrappedCmd)
asWrappedCmd.useStartProcess = forceStartProcess

View file

@ -268,7 +268,7 @@ func dedupEnvCase(caseInsensitive bool, env []string) []string {
// two interfaces with non-comparable underlying types.
func interfaceEqual(a, b interface{}) bool {
defer func() {
recover()
_ = recover()
}()
return a == b
}

View file

@ -33,11 +33,11 @@ func Test_wrappedCmd_CombinedOutputIsSame(t *testing.T) {
} {
t.Run(tt.name, func(t *testing.T) {
execCmd := &wrappedCmd{
cmd: exec.Command("python", tt.args...),
cmd: exec.Command("python", tt.args...), //nolint
}
execCmdOut := getCmdOutput(t, execCmd)
startProc := &wrappedCmd{
cmd: exec.Command("python", tt.args...),
cmd: exec.Command("python", tt.args...), //nolint
useStartProcess: true,
}
assert.NotEmpty(t, execCmdOut)