Merge pull request #10 from golangci/feature/add-column-and-disable-welcome-message
add column of issue line; disable welcome message by default
This commit is contained in:
commit
35f2cc3d39
@ -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
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user