Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: deprecate github-actions format #4726

Merged
merged 2 commits into from
May 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 {
ldez marked this conversation as resolved.
Show resolved Hide resolved
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"
)

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
Loading