diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-06-06 07:48:14 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-06-07 10:41:01 +0200 |
| commit | 70854cd639d40c037ac8bee3e35da1da6a1cea87 (patch) | |
| tree | 7445a432b6f2cb20fa491583935f117adc235f5a /pkg | |
| parent | 0e2e52a87ac286671583ffbcbf4e27e85e2a2fef (diff) | |
.golangci.yml: enable lll for pkg/report/linux.go
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/report/linux.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/pkg/report/linux.go b/pkg/report/linux.go index 6f968ada9..09b71a60f 100644 --- a/pkg/report/linux.go +++ b/pkg/report/linux.go @@ -48,6 +48,7 @@ func ctorLinux(cfg *config) (Reporter, []string, error) { vmlinux: vmlinux, symbols: symbols, } + // nolint: lll ctx.consoleOutputRe = regexp.MustCompile(`^(?:\*\* [0-9]+ printk messages dropped \*\* )?(?:.* login: )?(?:\<[0-9]+\>)?\[ *[0-9]+\.[0-9]+\](\[ *(?:C|T)[0-9]+\])? `) ctx.taskContext = regexp.MustCompile(`\[ *T[0-9]+\]`) ctx.cpuContext = regexp.MustCompile(`\[ *C[0-9]+\]`) @@ -551,7 +552,7 @@ func (ctx *linux) isCorrupted(title string, report []byte, format oopsFormat) (b } } if bytes.Contains(frames[i], []byte("(stack is not available)")) || - stackFrameRe.Match(frames[i]) { + linuxStackFrameRe.Match(frames[i]) { corrupted = false break } @@ -705,10 +706,11 @@ var linuxStallAnchorFrames = []*regexp.Regexp{ compile("exit_to_usermode"), } +// nolint: lll var ( - linuxSymbolizeRe = regexp.MustCompile(`(?:\[\<(?:[0-9a-f]+)\>\])?[ \t]+(?:[0-9]+:)?([a-zA-Z0-9_.]+)\+0x([0-9a-f]+)/0x([0-9a-f]+)`) - stackFrameRe = regexp.MustCompile(`^ *(?:\[\<?(?:[0-9a-f]+)\>?\] ?){0,2}[ \t]+(?:[0-9]+:)?([a-zA-Z0-9_.]+)\+0x([0-9a-f]+)/0x([0-9a-f]+)`) - linuxRipFrame = compile(`N?IP:? (?:(?:[0-9]+:)?(?:{{PC}} +){0,2}{{FUNC}}|[0-9]+:0x[0-9a-f]+|(?:[0-9]+:)?{{PC}} +\[< *\(null\)>\] +\(null\)|[0-9]+: +\(null\))`) + linuxSymbolizeRe = regexp.MustCompile(`(?:\[\<(?:[0-9a-f]+)\>\])?[ \t]+(?:[0-9]+:)?([a-zA-Z0-9_.]+)\+0x([0-9a-f]+)/0x([0-9a-f]+)`) + linuxStackFrameRe = regexp.MustCompile(`^ *(?:\[\<?(?:[0-9a-f]+)\>?\] ?){0,2}[ \t]+(?:[0-9]+:)?([a-zA-Z0-9_.]+)\+0x([0-9a-f]+)/0x([0-9a-f]+)`) + linuxRipFrame = compile(`N?IP:? (?:(?:[0-9]+:)?(?:{{PC}} +){0,2}{{FUNC}}|[0-9]+:0x[0-9a-f]+|(?:[0-9]+:)?{{PC}} +\[< *\(null\)>\] +\(null\)|[0-9]+: +\(null\))`) ) var linuxCorruptedTitles = []*regexp.Regexp{ @@ -897,6 +899,7 @@ func warningStackFmt(skip ...string) *stackFmt { } } +// nolint: lll var linuxOopses = append([]*oops{ { []byte("BUG:"), |
