From 17c05c062b6831e5bdc0f61ca105e95c163063bd Mon Sep 17 00:00:00 2001 From: golangci Date: Sat, 26 May 2018 09:48:16 +0300 Subject: [PATCH] add column of issue line; disable welcome message by default --- pkg/commands/run.go | 2 +- pkg/printers/text.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/commands/run.go b/pkg/commands/run.go index 46971b2f..787b76ee 100644 --- a/pkg/commands/run.go +++ b/pkg/commands/run.go @@ -45,7 +45,7 @@ func (e *Executor) initRun() { fmt.Sprintf("Format of output: %s", strings.Join(config.OutFormats, "|"))) runCmd.Flags().BoolVar(&oc.PrintIssuedLine, "print-issued-lines", true, "Print lines of code with issue") runCmd.Flags().BoolVar(&oc.PrintLinterName, "print-linter-name", true, "Print linter name in issue line") - runCmd.Flags().BoolVar(&oc.PrintWelcomeMessage, "print-welcome", true, "Print welcome message") + runCmd.Flags().BoolVar(&oc.PrintWelcomeMessage, "print-welcome", false, "Print welcome message") // Run config rc := &e.cfg.Run diff --git a/pkg/printers/text.go b/pkg/printers/text.go index 37517a7d..84c53cb4 100644 --- a/pkg/printers/text.go +++ b/pkg/printers/text.go @@ -102,6 +102,9 @@ func (p Text) printIssue(i *result.Issue) { text += fmt.Sprintf(" (%s)", i.FromLinter) } pos := p.SprintfColored(color.Bold, "%s:%d", i.FilePath(), i.Line()) + if i.Pos.Column != 0 { + pos += fmt.Sprintf(":%d", i.Pos.Column) + } fmt.Fprintf(stdOut, "%s: %s\n", pos, text) }