Skip to content

Commit 396da7c

Browse files
webwarrior-wsknocte
authored andcommitted
LiteralNames: fixed rule
Added another case to getLiteralIdents because F# compiler can produce different AST for similar code.
1 parent af06e2f commit 396da7c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/FSharpLint.Core/Rules/Conventions/Naming/LiteralNames.fs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ let private getIdentifiers (args:AstNodeRuleParams) =
1212
let rec getLiteralIdents = function
1313
| SynPat.Named(SynIdent(identifier, _), _, _, _) ->
1414
Array.singleton (identifier, identifier.idText, None)
15+
| SynPat.LongIdent(SynLongIdent([identifier], _, _), _, _, _, _, _) ->
16+
Array.singleton (identifier, identifier.idText, None)
1517
| SynPat.Paren(pat, _) -> getLiteralIdents pat
1618
| _ -> Array.empty
1719

0 commit comments

Comments
 (0)