Skip to content

Commit

Permalink
Configuration: add rule to Configuration
Browse files Browse the repository at this point in the history
Added UsedUnderscorePrefixedElements rule to Configuration.
  • Loading branch information
tehraninasab authored and webwarrior-ws committed Dec 21, 2023
1 parent bb15542 commit 82bd8fe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/FSharpLint.Core/Application/Configuration.fs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,8 @@ type ConventionsConfig =
binding:BindingConfig option
favourReRaise:EnabledConfig option
favourConsistentThis:RuleConfig<FavourConsistentThis.Config> option
suggestUseAutoProperty:EnabledConfig option}
suggestUseAutoProperty:EnabledConfig option
usedUnderscorePrefixedElements:EnabledConfig option }
with
member this.Flatten() =
[|
Expand All @@ -338,6 +339,7 @@ with
this.reimplementsFunction |> Option.bind (constructRuleIfEnabled ReimplementsFunction.rule) |> Option.toArray
this.canBeReplacedWithComposition |> Option.bind (constructRuleIfEnabled CanBeReplacedWithComposition.rule) |> Option.toArray
this.avoidSinglePipeOperator|> Option.bind (constructRuleIfEnabled AvoidSinglePipeOperator.rule) |> Option.toArray
this.usedUnderscorePrefixedElements |> Option.bind (constructRuleIfEnabled UsedUnderscorePrefixedElements.rule) |> Option.toArray
this.raiseWithTooManyArgs |> Option.map (fun config -> config.Flatten()) |> Option.toArray |> Array.concat
this.sourceLength |> Option.map (fun config -> config.Flatten()) |> Option.toArray |> Array.concat
this.naming |> Option.map (fun config -> config.Flatten()) |> Option.toArray |> Array.concat
Expand Down Expand Up @@ -410,6 +412,7 @@ type Configuration =
ReimplementsFunction:EnabledConfig option
CanBeReplacedWithComposition:EnabledConfig option
AvoidSinglePipeOperator:EnabledConfig option
UsedUnderscorePrefixedElements:EnabledConfig option
FailwithBadUsage:EnabledConfig option
RaiseWithSingleArgument:EnabledConfig option
FailwithWithSingleArgument:EnabledConfig option
Expand Down Expand Up @@ -497,6 +500,7 @@ with
ReimplementsFunction = None
CanBeReplacedWithComposition = None
AvoidSinglePipeOperator = None
UsedUnderscorePrefixedElements = None
FailwithWithSingleArgument = None
FailwithBadUsage = None
RaiseWithSingleArgument = None
Expand Down Expand Up @@ -647,6 +651,7 @@ let flattenConfig (config:Configuration) =
config.ReimplementsFunction |> Option.bind (constructRuleIfEnabled ReimplementsFunction.rule)
config.CanBeReplacedWithComposition |> Option.bind (constructRuleIfEnabled CanBeReplacedWithComposition.rule)
config.AvoidSinglePipeOperator |> Option.bind (constructRuleIfEnabled AvoidSinglePipeOperator.rule)
config.UsedUnderscorePrefixedElements |> Option.bind (constructRuleIfEnabled UsedUnderscorePrefixedElements.rule)

Check failure on line 654 in src/FSharpLint.Core/Application/Configuration.fs

View workflow job for this annotation

GitHub Actions / buildAndTest (ubuntu-latest)

The value, namespace, type or module 'UsedUnderscorePrefixedElements' is not defined.
config.FailwithBadUsage |> Option.bind (constructRuleIfEnabled FailwithBadUsage.rule)
config.RaiseWithSingleArgument |> Option.bind (constructRuleIfEnabled RaiseWithSingleArgument.rule)
config.FailwithWithSingleArgument |> Option.bind (constructRuleIfEnabled FailwithWithSingleArgument.rule)
Expand Down

0 comments on commit 82bd8fe

Please sign in to comment.