.golangci.yml: enable godot checker

A good one. Lots of fixed comments are contributed by episodic contributors.
So it's good to catch these earlier.
This commit is contained in:
Dmitry Vyukov 2020-06-04 22:20:22 +02:00
parent 26ae0a0edd
commit e3d77cf2a3
11 changed files with 20 additions and 18 deletions

View File

@ -37,6 +37,7 @@ linters:
- whitespace
- nestif
- goprintffuncname
- godot
disable:
- bodyclose
- depguard
@ -75,6 +76,8 @@ linters-settings:
min-occurrences: 4
nestif:
min-complexity: 12
godot:
check-all: true
issues:
exclude-use-default: false

View File

@ -934,7 +934,7 @@ func TestBisectCauseReproSyz2(t *testing.T) {
}
}
// Test that bisection results show up on UI
// Test that bisection results show up on UI.
func TestBugBisectionResults(t *testing.T) {
c := NewCtx(t)
defer c.Close()
@ -1037,7 +1037,7 @@ func TestBugBisectionResults(t *testing.T) {
c.expectTrue(bytes.Contains(content, []byte("kernel: add a fix")))
}
// Test that bisection status shows up on main page
// Test that bisection status shows up on main page.
func TestBugBisectionStatus(t *testing.T) {
c := NewCtx(t)
defer c.Close()

View File

@ -360,7 +360,7 @@ func TestJobRestrictedManager(t *testing.T) {
c.expectEQ(pollResp.KernelRepo, "git://restricted.git/restricted.git")
}
// Test that JobBisectFix is returned only after 30 days
// Test that JobBisectFix is returned only after 30 days.
func TestBisectFixJob(t *testing.T) {
c := NewCtx(t)
defer c.Close()
@ -409,7 +409,7 @@ func TestBisectFixJob(t *testing.T) {
c.client2.expectOK(c.client2.JobDone(done))
}
// Test that JobBisectFix jobs are re-tried if crash occurs on ToT
// Test that JobBisectFix jobs are re-tried if crash occurs on ToT.
func TestBisectFixRetry(t *testing.T) {
c := NewCtx(t)
defer c.Close()

View File

@ -2,6 +2,6 @@
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
// Just to make cross-compilation tests work,
// otherwise they fail with "no buildable Go source files"
// otherwise they fail with "no buildable Go source files".
package executor

View File

@ -27,7 +27,7 @@ type Node interface {
walk(cb func(Node))
}
// Top-level AST nodes:
// Top-level AST nodes.
type NewLine struct {
Pos Pos
@ -150,7 +150,7 @@ func (n *TypeDef) Info() (Pos, string, string) {
return n.Pos, "type", n.Name.Name
}
// Not top-level AST nodes:
// Not top-level AST nodes.
type Ident struct {
Pos Pos

View File

@ -399,7 +399,7 @@ func (gen *generator) mov64(reg int, v uint64) {
gen.imm64(v)
}
// movl $v, off(%rsp)
// movl $v, off(%rsp).
func (gen *generator) mov32toSPaddr(v uint32, off uint8) {
gen.addr32()
gen.operand32()
@ -565,7 +565,7 @@ var ports = []uint16{
0x20, 0x21, 0xa0, 0xa1, 0x4d0, 0x4d1, // 8259
}
// sys/kvm.txt also knows this list
// sys/kvm.txt also knows this list.
var msrs = []uint32{
0x0, 0x1, 0x10, 0x11, 0x12, 0x13, 0x17, 0x1b,
0x20, 0x21, 0x28, 0x29, 0x2a, 0x2c, 0x33, 0x34,

View File

@ -27,7 +27,7 @@ import (
// Configuration flags for Config.Flags.
type EnvFlags uint64
// Note: New / changed flags should be added to parse_env_flags in executor.cc
// Note: New / changed flags should be added to parse_env_flags in executor.cc.
const (
FlagDebug EnvFlags = 1 << iota // debug output from executor
FlagSignal // collect feedback signals (coverage)
@ -43,7 +43,7 @@ const (
FlagEnableDevlinkPCI // setup devlink PCI device
)
// Per-exec flags for ExecOpts.Flags:
// Per-exec flags for ExecOpts.Flags.
type ExecFlags uint64
const (
@ -247,7 +247,7 @@ var rateLimit = time.NewTicker(1 * time.Second)
// output: process output
// info: per-call info
// hanged: program hanged and was killed
// err0: failed to start the process or bug in executor itself
// err0: failed to start the process or bug in executor itself.
func (env *Env) Exec(opts *ExecOpts, p *prog.Prog) (output []byte, info *ProgInfo, hanged bool, err0 error) {
// Copy-in serialized program.
progSize, err := p.SerializeForExec(env.in)

View File

@ -1,7 +1,7 @@
// Copyright 2016 syzkaller project authors. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
// TODO: strip " (discriminator N)", "constprop", "isra" from function names
// TODO: strip " (discriminator N)", "constprop", "isra" from function names.
package symbolizer

View File

@ -153,7 +153,7 @@ func checkDataArg(arg *DataArg, compMap CompMap, exec func()) {
// Shrink and expand mutations model the cases when the syscall arguments
// are casted to narrower (and wider) integer types.
// ======================================================================
//
// Motivation for shrink:
// void f(u16 x) {
// u8 y = (u8)x;
@ -169,7 +169,7 @@ func checkDataArg(arg *DataArg, compMap CompMap, exec func()) {
// In this case we ignore such comparison because we couldn't come up with
// any valid code example that does similar things. To avoid such comparisons
// we check the sizes with leastSize().
// ======================================================================
//
// Motivation for expand:
// void f(i8 x) {
// i16 y = (i16)x;
@ -180,7 +180,6 @@ func checkDataArg(arg *DataArg, compMap CompMap, exec func()) {
// check the extension.
// As with shrink we ignore cases when the other operand is wider.
// Note that executor sign extends all the comparison operands to int64.
// ======================================================================
func shrinkExpand(v uint64, compMap CompMap, bitsize uint64) []uint64 {
v = truncateToBitSize(v, bitsize)
limit := uint64(1<<bitsize - 1)

View File

@ -4,7 +4,7 @@
// syz-ci is a continuous fuzzing system for syzkaller.
// It runs several syz-manager's, polls and rebuilds images for managers
// and polls and rebuilds syzkaller binaries.
// For usage instructions see: docs/ci.md
// For usage instructions see: docs/ci.md.
package main
// Implementation details:

View File

@ -79,7 +79,7 @@ func (t *tty) Close() error {
return nil
}
// Open dmesg remotely
// Open dmesg remotely.
func OpenRemoteConsole(bin string, args ...string) (rc io.ReadCloser, err error) {
rpipe, wpipe, err := osutil.LongPipe()
if err != nil {