diff --git a/.golangci.yml b/.golangci.yml index 4b4b7248..38e46f9f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -34,6 +34,7 @@ linters: - megacheck - stylecheck - govet + - whitespace disable: - typecheck - ineffassign diff --git a/pkg/csource/csource_test.go b/pkg/csource/csource_test.go index a5b12bab..152c732b 100644 --- a/pkg/csource/csource_test.go +++ b/pkg/csource/csource_test.go @@ -43,7 +43,6 @@ func TestGenerate(t *testing.T) { t.Parallel() testTarget(t, target, full) }) - } } diff --git a/pkg/repro/repro.go b/pkg/repro/repro.go index b3317dde..b207a92a 100644 --- a/pkg/repro/repro.go +++ b/pkg/repro/repro.go @@ -207,7 +207,6 @@ func (ctx *context) initInstance(cfg *mgrconfig.Config, vmPool *vm.Pool, vmIndex vmInst, err := vmPool.Create(vmIndex) if err != nil { return nil, fmt.Errorf("failed to create VM: %v", err) - } execprogBin, err := vmInst.Copy(cfg.SyzExecprogBin) if err != nil { @@ -228,7 +227,6 @@ func (ctx *context) initInstance(cfg *mgrconfig.Config, vmPool *vm.Pool, vmIndex execprogBin: execprogBin, executorBin: executorCmd, }, nil - } func (ctx *context) repro(entries []*prog.LogEntry, crashStart int) (*Result, error) { diff --git a/prog/encoding.go b/prog/encoding.go index f1fc97da..1f5b2b37 100644 --- a/prog/encoding.go +++ b/prog/encoding.go @@ -259,7 +259,6 @@ func (p *parser) parseProg() (*Prog, error) { r = name p.Parse('=') name = p.Ident() - } meta := p.target.SyscallMap[name] if meta == nil { @@ -1021,7 +1020,6 @@ func (p *parser) fixupAutos(prog *Prog) { a.Address = s.ma.alloc(nil, a.Res.Size()) default: panic(fmt.Sprintf("unsupported auto type %T", typ)) - } }) } diff --git a/prog/rand.go b/prog/rand.go index 8ade1780..c7c2c9be 100644 --- a/prog/rand.go +++ b/prog/rand.go @@ -492,7 +492,6 @@ func createTargetIfuzzConfig(target *Target) *ifuzz.Config { panic("unknown text kind") } return cfg - } func createIfuzzConfig(kind TextKind) *ifuzz.Config { diff --git a/sys/linux/init_vusb.go b/sys/linux/init_vusb.go index e5b67b83..5e4244f6 100644 --- a/sys/linux/init_vusb.go +++ b/sys/linux/init_vusb.go @@ -52,7 +52,6 @@ type HidDeviceID struct { func (arch *arch) generateUsbDeviceDescriptor(g *prog.Gen, typ0 prog.Type, dir prog.Dir, old prog.Arg) ( arg prog.Arg, calls []*prog.Call) { - if old == nil { arg = g.GenerateSpecialArg(typ0, dir, &calls) } else { @@ -142,7 +141,6 @@ func randUsbDeviceID(g *prog.Gen) UsbDeviceID { func (arch *arch) generateUsbHidDeviceDescriptor(g *prog.Gen, typ0 prog.Type, dir prog.Dir, old prog.Arg) ( arg prog.Arg, calls []*prog.Call) { - if old == nil { arg = g.GenerateSpecialArg(typ0, dir, &calls) } else { diff --git a/vm/gce/gce.go b/vm/gce/gce.go index 097bcd70..7bc049cb 100644 --- a/vm/gce/gce.go +++ b/vm/gce/gce.go @@ -239,7 +239,6 @@ func (inst *instance) Run(timeout time.Duration, stop <-chan bool, command strin conRpipe.Close() conWpipe.Close() return nil, nil, fmt.Errorf("failed to connect to console server: %v", err) - } conWpipe.Close()