Skip to content

Commit 867adaf

Browse files
authored
feat: deprecate github-actions format (#4726)
1 parent 4f5251d commit 867adaf

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

pkg/config/loader.go

+7
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,13 @@ func (l *Loader) handleDeprecation() error {
350350
l.cfg.Output.Formats = f
351351
}
352352

353+
for _, format := range l.cfg.Output.Formats {
354+
if format.Format == OutFormatGithubActions {
355+
l.log.Warnf("The output format `%s` is deprecated, please use `%s`", OutFormatGithubActions, OutFormatColoredLineNumber)
356+
break // To avoid repeating the message if there are several usages of github-actions format.
357+
}
358+
}
359+
353360
l.handleLinterOptionDeprecations()
354361

355362
return nil

pkg/config/output.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const (
1717
OutFormatCodeClimate = "code-climate"
1818
OutFormatHTML = "html"
1919
OutFormatJunitXML = "junit-xml"
20-
OutFormatGithubActions = "github-actions"
20+
OutFormatGithubActions = "github-actions" // Deprecated
2121
OutFormatTeamCity = "teamcity"
2222
OutFormatSarif = "sarif"
2323
)

pkg/printers/githubaction.go

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ type GitHubAction struct {
1515
}
1616

1717
// NewGitHubAction output format outputs issues according to GitHub actions.
18+
// Deprecated
1819
func NewGitHubAction(w io.Writer) *GitHubAction {
1920
return &GitHubAction{w: w}
2021
}

0 commit comments

Comments
 (0)