feat: deprecate github-actions format (#4726)

This commit is contained in:
Ludovic Fernandez 2024-05-19 20:38:38 +02:00 committed by GitHub
parent 4f5251d3c8
commit 867adaf996
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 1 deletions

View File

@ -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

View File

@ -17,7 +17,7 @@ const (
OutFormatCodeClimate = "code-climate"
OutFormatHTML = "html"
OutFormatJunitXML = "junit-xml"
OutFormatGithubActions = "github-actions"
OutFormatGithubActions = "github-actions" // Deprecated
OutFormatTeamCity = "teamcity"
OutFormatSarif = "sarif"
)

View File

@ -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}
}