@@ -184,14 +184,16 @@ with
184184 |] |> Array.concat
185185
186186type RaiseWithTooManyArgsConfig =
187- { raiseWithSingleArgument: EnabledConfig option
187+ { failwithBadUsage: EnabledConfig option
188+ raiseWithSingleArgument: EnabledConfig option
188189 nullArgWithSingleArgument: EnabledConfig option
189190 invalidOpWithSingleArgument: EnabledConfig option
190191 invalidArgWithTwoArguments: EnabledConfig option
191192 failwithfWithArgumentsMatchingFormatString: EnabledConfig option }
192193with
193194 member this.Flatten () =
194195 [|
196+ this.failwithBadUsage |> Option.bind ( constructRuleIfEnabled FailwithBadUsage.rule) |> Option.toArray
195197 this.raiseWithSingleArgument |> Option.bind ( constructRuleIfEnabled RaiseWithSingleArgument.rule) |> Option.toArray
196198 this.nullArgWithSingleArgument |> Option.bind ( constructRuleIfEnabled NullArgWithSingleArgument.rule) |> Option.toArray
197199 this.invalidOpWithSingleArgument |> Option.bind ( constructRuleIfEnabled InvalidOpWithSingleArgument.rule) |> Option.toArray
231233
232234type NamesConfig =
233235 { interfaceNames: RuleConfig < NamingConfig > option
236+ genericTypesNames: RuleConfig < NamingConfig > option
234237 exceptionNames: RuleConfig < NamingConfig > option
235238 typeNames: RuleConfig < NamingConfig > option
236239 recordFieldNames: RuleConfig < NamingConfig > option
251254 member this.Flatten () =
252255 [|
253256 this.interfaceNames |> Option.bind ( constructRuleWithConfig InterfaceNames.rule) |> Option.toArray
257+ this.genericTypesNames |> Option.bind ( constructRuleWithConfig GenericTypesNames.rule) |> Option.toArray
254258 this.exceptionNames |> Option.bind ( constructRuleWithConfig ExceptionNames.rule) |> Option.toArray
255259 this.typeNames |> Option.bind ( constructRuleWithConfig TypeNames.rule) |> Option.toArray
256260 this.recordFieldNames |> Option.bind ( constructRuleWithConfig RecordFieldNames.rule) |> Option.toArray
@@ -288,11 +292,13 @@ type BindingConfig =
288292 { favourIgnoreOverLetWild: EnabledConfig option
289293 wildcardNamedWithAsPattern: EnabledConfig option
290294 uselessBinding: EnabledConfig option
291- tupleOfWildcards: EnabledConfig option }
295+ tupleOfWildcards: EnabledConfig option
296+ favourTypedIgnore: EnabledConfig option }
292297with
293298 member this.Flatten () =
294299 [|
295300 this.favourIgnoreOverLetWild |> Option.bind ( constructRuleIfEnabled FavourIgnoreOverLetWild.rule) |> Option.toArray
301+ this.favourTypedIgnore |> Option.bind ( constructRuleIfEnabled FavourTypedIgnore.rule) |> Option.toArray
296302 this.wildcardNamedWithAsPattern |> Option.bind ( constructRuleIfEnabled WildcardNamedWithAsPattern.rule) |> Option.toArray
297303 this.uselessBinding |> Option.bind ( constructRuleIfEnabled UselessBinding.rule) |> Option.toArray
298304 this.tupleOfWildcards |> Option.bind ( constructRuleIfEnabled TupleOfWildcards.rule) |> Option.toArray
@@ -309,13 +315,17 @@ type ConventionsConfig =
309315 sourceLength: SourceLengthConfig option
310316 naming: NamesConfig option
311317 numberOfItems: NumberOfItemsConfig option
312- binding: BindingConfig option }
318+ binding: BindingConfig option
319+ favourReRaise: EnabledConfig option
320+ favourConsistentThis: RuleConfig < FavourConsistentThis .Config > option }
313321with
314322 member this.Flatten () =
315323 [|
316324 this.recursiveAsyncFunction |> Option.bind ( constructRuleIfEnabled RecursiveAsyncFunction.rule) |> Option.toArray
317325 this.redundantNewKeyword |> Option.bind ( constructRuleIfEnabled RedundantNewKeyword.rule) |> Option.toArray
326+ this.favourReRaise |> Option.bind ( constructRuleIfEnabled FavourReRaise.rule) |> Option.toArray
318327 this.nestedStatements |> Option.bind ( constructRuleWithConfig NestedStatements.rule) |> Option.toArray
328+ this.favourConsistentThis |> Option.bind ( constructRuleWithConfig FavourConsistentThis.rule) |> Option.toArray
319329 this.cyclomaticComplexity |> Option.bind ( constructRuleWithConfig CyclomaticComplexity.rule) |> Option.toArray
320330 this.reimplementsFunction |> Option.bind ( constructRuleIfEnabled ReimplementsFunction.rule) |> Option.toArray
321331 this.canBeReplacedWithComposition |> Option.bind ( constructRuleIfEnabled CanBeReplacedWithComposition.rule) |> Option.toArray
@@ -380,10 +390,13 @@ type Configuration =
380390 PatternMatchExpressionIndentation: EnabledConfig option
381391 RecursiveAsyncFunction: EnabledConfig option
382392 RedundantNewKeyword: EnabledConfig option
393+ FavourReRaise: EnabledConfig option
383394 NestedStatements: RuleConfig < NestedStatements .Config > option
395+ FavourConsistentThis: RuleConfig < FavourConsistentThis .Config > option
384396 CyclomaticComplexity: RuleConfig < CyclomaticComplexity .Config > option
385397 ReimplementsFunction: EnabledConfig option
386398 CanBeReplacedWithComposition: EnabledConfig option
399+ FailwithBadUsage: EnabledConfig option
387400 RaiseWithSingleArgument: EnabledConfig option
388401 FailwithWithSingleArgument: EnabledConfig option
389402 NullArgWithSingleArgument: EnabledConfig option
@@ -403,6 +416,7 @@ type Configuration =
403416 MaxLinesInUnion: RuleConfig < Helper .SourceLength .Config > option
404417 MaxLinesInClass: RuleConfig < Helper .SourceLength .Config > option
405418 InterfaceNames: RuleConfig < NamingConfig > option
419+ GenericTypesNames: RuleConfig < NamingConfig > option
406420 ExceptionNames: RuleConfig < NamingConfig > option
407421 TypeNames: RuleConfig < NamingConfig > option
408422 RecordFieldNames: RuleConfig < NamingConfig > option
@@ -424,6 +438,7 @@ type Configuration =
424438 MaxNumberOfMembers: RuleConfig < Helper .NumberOfItems .Config > option
425439 MaxNumberOfBooleanOperatorsInCondition: RuleConfig < Helper .NumberOfItems .Config > option
426440 FavourIgnoreOverLetWild: EnabledConfig option
441+ FavourTypedIgnore: EnabledConfig option
427442 WildcardNamedWithAsPattern: EnabledConfig option
428443 UselessBinding: EnabledConfig option
429444 TupleOfWildcards: EnabledConfig option
@@ -457,11 +472,14 @@ with
457472 PatternMatchExpressionIndentation = None
458473 RecursiveAsyncFunction = None
459474 RedundantNewKeyword = None
475+ FavourReRaise = None
460476 NestedStatements = None
477+ FavourConsistentThis = None
461478 CyclomaticComplexity = None
462479 ReimplementsFunction = None
463480 CanBeReplacedWithComposition = None
464481 FailwithWithSingleArgument = None
482+ FailwithBadUsage = None
465483 RaiseWithSingleArgument = None
466484 NullArgWithSingleArgument = None
467485 InvalidOpWithSingleArgument = None
480498 MaxLinesInUnion = None
481499 MaxLinesInClass = None
482500 InterfaceNames = None
501+ GenericTypesNames = None
483502 ExceptionNames = None
484503 TypeNames = None
485504 RecordFieldNames = None
501520 MaxNumberOfMembers = None
502521 MaxNumberOfBooleanOperatorsInCondition = None
503522 FavourIgnoreOverLetWild = None
523+ FavourTypedIgnore = None
504524 WildcardNamedWithAsPattern = None
505525 UselessBinding = None
506526 TupleOfWildcards = None
@@ -597,10 +617,13 @@ let flattenConfig (config:Configuration) =
597617 config.PatternMatchExpressionIndentation |> Option.bind ( constructRuleIfEnabled PatternMatchExpressionIndentation.rule)
598618 config.RecursiveAsyncFunction |> Option.bind ( constructRuleIfEnabled RecursiveAsyncFunction.rule)
599619 config.RedundantNewKeyword |> Option.bind ( constructRuleIfEnabled RedundantNewKeyword.rule)
620+ config.FavourReRaise |> Option.bind ( constructRuleIfEnabled FavourReRaise.rule)
600621 config.NestedStatements |> Option.bind ( constructRuleWithConfig NestedStatements.rule)
622+ config.FavourConsistentThis |> Option.bind ( constructRuleWithConfig FavourConsistentThis.rule)
601623 config.CyclomaticComplexity |> Option.bind ( constructRuleWithConfig CyclomaticComplexity.rule)
602624 config.ReimplementsFunction |> Option.bind ( constructRuleIfEnabled ReimplementsFunction.rule)
603625 config.CanBeReplacedWithComposition |> Option.bind ( constructRuleIfEnabled CanBeReplacedWithComposition.rule)
626+ config.FailwithBadUsage |> Option.bind ( constructRuleIfEnabled FailwithBadUsage.rule)
604627 config.RaiseWithSingleArgument |> Option.bind ( constructRuleIfEnabled RaiseWithSingleArgument.rule)
605628 config.FailwithWithSingleArgument |> Option.bind ( constructRuleIfEnabled FailwithWithSingleArgument.rule)
606629 config.NullArgWithSingleArgument |> Option.bind ( constructRuleIfEnabled NullArgWithSingleArgument.rule)
@@ -620,6 +643,7 @@ let flattenConfig (config:Configuration) =
620643 config.MaxLinesInUnion |> Option.bind ( constructRuleWithConfig MaxLinesInUnion.rule)
621644 config.MaxLinesInClass |> Option.bind ( constructRuleWithConfig MaxLinesInClass.rule)
622645 config.InterfaceNames |> Option.bind ( constructRuleWithConfig InterfaceNames.rule)
646+ config.GenericTypesNames |> Option.bind ( constructRuleWithConfig GenericTypesNames.rule)
623647 config.ExceptionNames |> Option.bind ( constructRuleWithConfig ExceptionNames.rule)
624648 config.TypeNames |> Option.bind ( constructRuleWithConfig TypeNames.rule)
625649 config.RecordFieldNames |> Option.bind ( constructRuleWithConfig RecordFieldNames.rule)
@@ -642,6 +666,7 @@ let flattenConfig (config:Configuration) =
642666 config.MaxNumberOfMembers |> Option.bind ( constructRuleWithConfig MaxNumberOfMembers.rule)
643667 config.MaxNumberOfBooleanOperatorsInCondition |> Option.bind ( constructRuleWithConfig MaxNumberOfBooleanOperatorsInCondition.rule)
644668 config.FavourIgnoreOverLetWild |> Option.bind ( constructRuleIfEnabled FavourIgnoreOverLetWild.rule)
669+ config.FavourTypedIgnore |> Option.bind ( constructRuleIfEnabled FavourTypedIgnore.rule)
645670 config.WildcardNamedWithAsPattern |> Option.bind ( constructRuleIfEnabled WildcardNamedWithAsPattern.rule)
646671 config.UselessBinding |> Option.bind ( constructRuleIfEnabled UselessBinding.rule)
647672 config.TupleOfWildcards |> Option.bind ( constructRuleIfEnabled TupleOfWildcards.rule)
0 commit comments