.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
- stylecheck
- govet
- whitespace
disable:
- typecheck
- ineffassign

View File

@ -43,7 +43,6 @@ func TestGenerate(t *testing.T) {
t.Parallel()
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)
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) {

View File

@ -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))
}
})
}

View File

@ -492,7 +492,6 @@ func createTargetIfuzzConfig(target *Target) *ifuzz.Config {
panic("unknown text kind")
}
return cfg
}
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) (
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 {

View File

@ -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()