Skip to content

build(deps): bump github.com/mgechev/revive from 1.3.9 to 1.4.0 #5035

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

Merged
merged 2 commits into from
Sep 22, 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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ require (
github.com/maratori/testpackage v1.1.1
github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26
github.com/mattn/go-colorable v0.1.13
github.com/mgechev/revive v1.3.9
github.com/mgechev/revive v1.4.0
github.com/mitchellh/go-homedir v1.1.0
github.com/mitchellh/go-ps v1.0.0
github.com/moricho/tparallel v0.3.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions pkg/golinters/revive/revive.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ func toIssue(pass *analysis.Pass, object *jsonObject) goanalysis.Issue {
// This function mimics the GetConfig function of revive.
// This allows to get default values and right types.
// https://github.com/golangci/golangci-lint/issues/1745
// https://github.com/mgechev/revive/blob/v1.3.7/config/config.go#L217
// https://github.com/mgechev/revive/blob/v1.3.7/config/config.go#L169-L174
// https://github.com/mgechev/revive/blob/v1.4.0/config/config.go#L218
// https://github.com/mgechev/revive/blob/v1.4.0/config/config.go#L170-L176
func getConfig(cfg *config.ReviveSettings) (*lint.Config, error) {
conf := defaultConfig()

Expand Down Expand Up @@ -284,7 +284,7 @@ func safeTomlSlice(r []any) []any {
}

// This element is not exported by revive, so we need copy the code.
// Extracted from https://github.com/mgechev/revive/blob/v1.3.9/config/config.go#L15
// Extracted from https://github.com/mgechev/revive/blob/v1.4.0/config/config.go#L16
var defaultRules = []lint.Rule{
&rule.VarDeclarationsRule{},
&rule.PackageCommentsRule{},
Expand Down Expand Up @@ -373,7 +373,7 @@ var allRules = append([]lint.Rule{
const defaultConfidence = 0.8

// This element is not exported by revive, so we need copy the code.
// Extracted from https://github.com/mgechev/revive/blob/v1.1.4/config/config.go#L145
// Extracted from https://github.com/mgechev/revive/blob/v1.4.0/config/config.go#L181
func normalizeConfig(cfg *lint.Config) {
// NOTE(ldez): this custom section for golangci-lint should be kept.
// ---
Expand Down Expand Up @@ -419,7 +419,7 @@ func normalizeConfig(cfg *lint.Config) {
}

// This element is not exported by revive, so we need copy the code.
// Extracted from https://github.com/mgechev/revive/blob/v1.1.4/config/config.go#L214
// Extracted from https://github.com/mgechev/revive/blob/v1.4.0/config/config.go#L181
func defaultConfig() *lint.Config {
defaultConfig := lint.Config{
Confidence: defaultConfidence,
Expand Down
Loading