.golangci.yml: enable whitespace checker

Points to bad empty lines very precisely.
This commit is contained in:
Dmitry Vyukov 2020-06-04 21:39:24 +02:00
parent 555756280e
commit 503fd5b2f7
7 changed files with 1 additions and 9 deletions

View File

@ -34,6 +34,7 @@ linters:
- megacheck - megacheck
- stylecheck - stylecheck
- govet - govet
- whitespace
disable: disable:
- typecheck - typecheck
- ineffassign - ineffassign

View File

@ -43,7 +43,6 @@ func TestGenerate(t *testing.T) {
t.Parallel() t.Parallel()
testTarget(t, target, full) testTarget(t, target, full)
}) })
} }
} }

View File

@ -207,7 +207,6 @@ func (ctx *context) initInstance(cfg *mgrconfig.Config, vmPool *vm.Pool, vmIndex
vmInst, err := vmPool.Create(vmIndex) vmInst, err := vmPool.Create(vmIndex)
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to create VM: %v", err) return nil, fmt.Errorf("failed to create VM: %v", err)
} }
execprogBin, err := vmInst.Copy(cfg.SyzExecprogBin) execprogBin, err := vmInst.Copy(cfg.SyzExecprogBin)
if err != nil { if err != nil {
@ -228,7 +227,6 @@ func (ctx *context) initInstance(cfg *mgrconfig.Config, vmPool *vm.Pool, vmIndex
execprogBin: execprogBin, execprogBin: execprogBin,
executorBin: executorCmd, executorBin: executorCmd,
}, nil }, nil
} }
func (ctx *context) repro(entries []*prog.LogEntry, crashStart int) (*Result, error) { func (ctx *context) repro(entries []*prog.LogEntry, crashStart int) (*Result, error) {

View File

@ -259,7 +259,6 @@ func (p *parser) parseProg() (*Prog, error) {
r = name r = name
p.Parse('=') p.Parse('=')
name = p.Ident() name = p.Ident()
} }
meta := p.target.SyscallMap[name] meta := p.target.SyscallMap[name]
if meta == nil { if meta == nil {
@ -1021,7 +1020,6 @@ func (p *parser) fixupAutos(prog *Prog) {
a.Address = s.ma.alloc(nil, a.Res.Size()) a.Address = s.ma.alloc(nil, a.Res.Size())
default: default:
panic(fmt.Sprintf("unsupported auto type %T", typ)) panic(fmt.Sprintf("unsupported auto type %T", typ))
} }
}) })
} }

View File

@ -492,7 +492,6 @@ func createTargetIfuzzConfig(target *Target) *ifuzz.Config {
panic("unknown text kind") panic("unknown text kind")
} }
return cfg return cfg
} }
func createIfuzzConfig(kind TextKind) *ifuzz.Config { func createIfuzzConfig(kind TextKind) *ifuzz.Config {

View File

@ -52,7 +52,6 @@ type HidDeviceID struct {
func (arch *arch) generateUsbDeviceDescriptor(g *prog.Gen, typ0 prog.Type, dir prog.Dir, old prog.Arg) ( func (arch *arch) generateUsbDeviceDescriptor(g *prog.Gen, typ0 prog.Type, dir prog.Dir, old prog.Arg) (
arg prog.Arg, calls []*prog.Call) { arg prog.Arg, calls []*prog.Call) {
if old == nil { if old == nil {
arg = g.GenerateSpecialArg(typ0, dir, &calls) arg = g.GenerateSpecialArg(typ0, dir, &calls)
} else { } 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) ( func (arch *arch) generateUsbHidDeviceDescriptor(g *prog.Gen, typ0 prog.Type, dir prog.Dir, old prog.Arg) (
arg prog.Arg, calls []*prog.Call) { arg prog.Arg, calls []*prog.Call) {
if old == nil { if old == nil {
arg = g.GenerateSpecialArg(typ0, dir, &calls) arg = g.GenerateSpecialArg(typ0, dir, &calls)
} else { } else {

View File

@ -239,7 +239,6 @@ func (inst *instance) Run(timeout time.Duration, stop <-chan bool, command strin
conRpipe.Close() conRpipe.Close()
conWpipe.Close() conWpipe.Close()
return nil, nil, fmt.Errorf("failed to connect to console server: %v", err) return nil, nil, fmt.Errorf("failed to connect to console server: %v", err)
} }
conWpipe.Close() conWpipe.Close()