Skip to content

Add missing rule checks #713

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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 docs/content/how-tos/rules/FL0079.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ hide_menu: true

# SuggestUseAutoProperty (FL0079)

*Introduced in `0.21.7`*
*Introduced in `0.24.3`*

## Cause

Expand Down
2 changes: 1 addition & 1 deletion docs/content/how-tos/rules/FL0080.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ hide_menu: true

# UnnestedFunctionNames (FL0080)

*Introduced in `0.21.8`*
*Introduced in `0.24.3`*

## Cause

Expand Down
2 changes: 1 addition & 1 deletion docs/content/how-tos/rules/FL0081.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ hide_menu: true

# NestedFunctionNames (FL0081)

*Introduced in `0.21.8`*
*Introduced in `0.24.3`*

## Cause

Expand Down
7 changes: 7 additions & 0 deletions src/FSharpLint.Core/Application/Configuration.fs
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,8 @@ type Configuration =
NonPublicValuesNames:RuleConfig<NamingConfig> option
PrivateValuesNames:RuleConfig<NamingConfig> option
InternalValuesNames:RuleConfig<NamingConfig> option
UnnestedFunctionNames:RuleConfig<NamingConfig> option
NestedFunctionNames:RuleConfig<NamingConfig> option
MaxNumberOfItemsInTuple:RuleConfig<Helper.NumberOfItems.Config> option
MaxNumberOfFunctionParameters:RuleConfig<Helper.NumberOfItems.Config> option
MaxNumberOfMembers:RuleConfig<Helper.NumberOfItems.Config> option
Expand Down Expand Up @@ -556,6 +558,8 @@ with
NonPublicValuesNames = None
PrivateValuesNames = None
InternalValuesNames = None
UnnestedFunctionNames = None
NestedFunctionNames = None
MaxNumberOfItemsInTuple = None
MaxNumberOfFunctionParameters = None
MaxNumberOfMembers = None
Expand Down Expand Up @@ -712,6 +716,8 @@ let flattenConfig (config:Configuration) =
config.NonPublicValuesNames |> Option.bind (constructRuleWithConfig InternalValuesNames.rule)
config.PrivateValuesNames |> Option.bind (constructRuleWithConfig PrivateValuesNames.rule)
config.InternalValuesNames |> Option.bind (constructRuleWithConfig InternalValuesNames.rule)
config.UnnestedFunctionNames |> Option.bind (constructRuleWithConfig UnnestedFunctionNames.rule)
config.NestedFunctionNames |> Option.bind (constructRuleWithConfig NestedFunctionNames.rule)
config.MaxNumberOfItemsInTuple |> Option.bind (constructRuleWithConfig MaxNumberOfItemsInTuple.rule)
config.MaxNumberOfFunctionParameters |> Option.bind (constructRuleWithConfig MaxNumberOfFunctionParameters.rule)
config.MaxNumberOfMembers |> Option.bind (constructRuleWithConfig MaxNumberOfMembers.rule)
Expand All @@ -728,6 +734,7 @@ let flattenConfig (config:Configuration) =
config.TrailingNewLineInFile |> Option.bind (constructRuleIfEnabled TrailingNewLineInFile.rule)
config.NoTabCharacters |> Option.bind (constructRuleIfEnabled NoTabCharacters.rule)
config.NoPartialFunctions |> Option.bind (constructRuleWithConfig NoPartialFunctions.rule)
config.SuggestUseAutoProperty |> Option.bind (constructRuleIfEnabled SuggestUseAutoProperty.rule)
config.EnsureTailCallDiagnosticsInRecursiveFunctions |> Option.bind (constructRuleIfEnabled EnsureTailCallDiagnosticsInRecursiveFunctions.rule)
config.FavourAsKeyword |> Option.bind (constructRuleIfEnabled FavourAsKeyword.rule)
|] |> Array.choose id
Expand Down