Skip to content

Commit 35f2cc3

Browse files
author
golangci
authored
Merge pull request #10 from golangci/feature/add-column-and-disable-welcome-message
add column of issue line; disable welcome message by default
2 parents 4ce8d74 + 17c05c0 commit 35f2cc3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pkg/commands/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func (e *Executor) initRun() {
4545
fmt.Sprintf("Format of output: %s", strings.Join(config.OutFormats, "|")))
4646
runCmd.Flags().BoolVar(&oc.PrintIssuedLine, "print-issued-lines", true, "Print lines of code with issue")
4747
runCmd.Flags().BoolVar(&oc.PrintLinterName, "print-linter-name", true, "Print linter name in issue line")
48-
runCmd.Flags().BoolVar(&oc.PrintWelcomeMessage, "print-welcome", true, "Print welcome message")
48+
runCmd.Flags().BoolVar(&oc.PrintWelcomeMessage, "print-welcome", false, "Print welcome message")
4949

5050
// Run config
5151
rc := &e.cfg.Run

pkg/printers/text.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ func (p Text) printIssue(i *result.Issue) {
102102
text += fmt.Sprintf(" (%s)", i.FromLinter)
103103
}
104104
pos := p.SprintfColored(color.Bold, "%s:%d", i.FilePath(), i.Line())
105+
if i.Pos.Column != 0 {
106+
pos += fmt.Sprintf(":%d", i.Pos.Column)
107+
}
105108
fmt.Fprintf(stdOut, "%s: %s\n", pos, text)
106109
}
107110

0 commit comments

Comments
 (0)