Skip to content

Commit

Permalink
feat: deprecate github-actions format (#4726)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed May 19, 2024
1 parent 4f5251d commit 867adaf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions pkg/config/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,13 @@ func (l *Loader) handleDeprecation() error {
l.cfg.Output.Formats = f
}

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

l.handleLinterOptionDeprecations()

return nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const (
OutFormatCodeClimate = "code-climate"
OutFormatHTML = "html"
OutFormatJunitXML = "junit-xml"
OutFormatGithubActions = "github-actions"
OutFormatGithubActions = "github-actions" // Deprecated
OutFormatTeamCity = "teamcity"
OutFormatSarif = "sarif"
)
Expand Down
1 change: 1 addition & 0 deletions pkg/printers/githubaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type GitHubAction struct {
}

// NewGitHubAction output format outputs issues according to GitHub actions.
// Deprecated
func NewGitHubAction(w io.Writer) *GitHubAction {
return &GitHubAction{w: w}
}
Expand Down

0 comments on commit 867adaf

Please sign in to comment.