Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ let private getIdentifiers (args:AstNodeRuleParams) =
| AstNode.Expression(SynExpr.ForEach(_, _, _, true, pattern, _, _, _)) ->
getPatternIdents AccessControlLevel.Private (getValueOrFunctionIdents args.CheckInfo) false pattern
| AstNode.Binding(SynBinding(_, _, _, _, attributes, _, valData, pattern, _, _, _, _, _)) ->
if not (isLiteral attributes || isExtern attributes) then
if not (isLiteral attributes || isExtern attributes || isNested args args.NodeIndex) then
match identifierTypeFromValData valData with
| Value | Function ->
let accessibility = getAccessControlLevel args.SyntaxArray args.NodeIndex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,23 @@ let (|Empty|_|) str =
"""

this.AssertNoWarnings()

let pascalCaseConfig = { config with Naming = Some NamingCase.PascalCase }

[<TestFixture>]
type TestConventionsPublicValuesNamesPascalCase() =
inherit TestAstNodeRuleBase.TestAstNodeRuleBase(PublicValuesNames.rule pascalCaseConfig)

[<Test>]
member this.``Nested function should not generate warning``() =
this.Parse """
module Program

[ "one" ]
|> Seq.iter (fun str ->
let someFunc bar = bar
someFunc str
)
"""

this.AssertNoWarnings()
Loading