Skip to content

Commit 1728773

Browse files
BennieCopelandxperiandri
authored andcommitted
Minor performance optimization
1 parent 762e62b commit 1728773

File tree

1 file changed

+5
-5
lines changed
  • src/FSharpLint.Core/Application

1 file changed

+5
-5
lines changed

src/FSharpLint.Core/Application/Lint.fs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ module Lint =
113113
{ CancellationToken:CancellationToken option
114114
ErrorReceived:Suggestion.LintWarning -> unit
115115
ReportLinterProgress:ProjectProgress -> unit
116-
Configuration:Configuration.Configuration }
116+
Rules:Configuration.LoadedRules }
117117

118118
type Context =
119119
{ IndentationRuleContext:Map<int,bool*int>
@@ -207,7 +207,7 @@ module Lint =
207207
| Some(x) -> not x.IsCancellationRequested
208208
| None -> true
209209

210-
let enabledRules = Configuration.flattenConfig lintInfo.Configuration
210+
let enabledRules = lintInfo.Rules
211211

212212
let lines = String.toLines fileInfo.Text |> Array.map (fun (line, _, _) -> line)
213213
let allRuleNames =
@@ -411,7 +411,7 @@ module Lint =
411411

412412
let parseFilesInProject files projectOptions =
413413
let lintInformation =
414-
{ Configuration = config
414+
{ Rules = Configuration.flattenConfig config
415415
CancellationToken = optionalParams.CancellationToken
416416
ErrorReceived = warningReceived
417417
ReportLinterProgress = projectProgress }
@@ -517,7 +517,7 @@ module Lint =
517517

518518
optionalParams.ReceivedWarning |> Option.iter (fun func -> func warning)
519519
let lintInformation =
520-
{ Configuration = config
520+
{ Rules = Configuration.flattenConfig config
521521
CancellationToken = optionalParams.CancellationToken
522522
ErrorReceived = warningReceived
523523
ReportLinterProgress = Option.defaultValue ignore optionalParams.ReportLinterProgress }
@@ -560,7 +560,7 @@ module Lint =
560560
optionalParams.ReceivedWarning |> Option.iter (fun func -> func warning)
561561

562562
let lintInformation =
563-
{ Configuration = config
563+
{ Rules = Configuration.flattenConfig config
564564
CancellationToken = optionalParams.CancellationToken
565565
ErrorReceived = warningReceived
566566
ReportLinterProgress = Option.defaultValue ignore optionalParams.ReportLinterProgress }

0 commit comments

Comments
 (0)