@@ -65,7 +65,7 @@ func NewRevive(cfg *config.ReviveSettings) *goanalysis.Linter {
6565 return nil , err
6666 }
6767
68- revive := lint .New (os .ReadFile )
68+ revive := lint .New (os .ReadFile , cfg . MaxOpenFiles )
6969
7070 lintingRules , err := reviveConfig .GetLintingRules (conf )
7171 if err != nil {
@@ -148,7 +148,7 @@ func reviveToIssue(pass *analysis.Pass, object *jsonObject) goanalysis.Issue {
148148// This function mimics the GetConfig function of revive.
149149// This allows to get default values and right types.
150150// https://github.com/golangci/golangci-lint/issues/1745
151- // https://github.com/mgechev/revive/blob/389ba853b0b3587f0c3b71b5f0c61ea4e23928ec /config/config.go#L155
151+ // https://github.com/mgechev/revive/blob/v1.1.4 /config/config.go#L182
152152func getReviveConfig (cfg * config.ReviveSettings ) (* lint.Config , error ) {
153153 conf := defaultConfig ()
154154
@@ -235,7 +235,7 @@ func safeTomlSlice(r []interface{}) []interface{} {
235235}
236236
237237// This element is not exported by revive, so we need copy the code.
238- // Extracted from https://github.com/mgechev/revive/blob/111721be475b73b5a2304dd01ccbcab587357fca /config/config.go#L15
238+ // Extracted from https://github.com/mgechev/revive/blob/v1.1.4 /config/config.go#L15
239239var defaultRules = []lint.Rule {
240240 & rule.VarDeclarationsRule {},
241241 & rule.PackageCommentsRule {},
@@ -310,14 +310,11 @@ var allRules = append([]lint.Rule{
310310 & rule.OptimizeOperandsOrderRule {},
311311}, defaultRules ... )
312312
313+ const defaultConfidence = 0.8
314+
313315// This element is not exported by revive, so we need copy the code.
314- // Extracted from https://github.com/mgechev/revive/blob/111721be475b73b5a2304dd01ccbcab587357fca /config/config.go#L143
316+ // Extracted from https://github.com/mgechev/revive/blob/v1.1.4 /config/config.go#L145
315317func normalizeConfig (cfg * lint.Config ) {
316- const defaultConfidence = 0.8
317- if cfg .Confidence == 0 {
318- cfg .Confidence = defaultConfidence
319- }
320-
321318 if len (cfg .Rules ) == 0 {
322319 cfg .Rules = map [string ]lint.RuleConfig {}
323320 }
@@ -352,10 +349,10 @@ func normalizeConfig(cfg *lint.Config) {
352349}
353350
354351// This element is not exported by revive, so we need copy the code.
355- // Extracted from https://github.com/mgechev/revive/blob/111721be475b73b5a2304dd01ccbcab587357fca /config/config.go#L210
352+ // Extracted from https://github.com/mgechev/revive/blob/v1.1.4 /config/config.go#L214
356353func defaultConfig () * lint.Config {
357354 defaultConfig := lint.Config {
358- Confidence : 0.0 ,
355+ Confidence : defaultConfidence ,
359356 Severity : lint .SeverityWarning ,
360357 Rules : map [string ]lint.RuleConfig {},
361358 }
0 commit comments