Skip to content
Merged
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
8 changes: 6 additions & 2 deletions src/FSharpLint.Core/Rules/Conventions/Naming/NamingHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,12 @@ let isImplicitModule (SynModuleOrNamespace.SynModuleOrNamespace(longIdent, _, mo

// Check the identifiers in the module name have no length.
// Not ideal but there's no attribute in the AST indicating the module is implicit from the file name.
// TODO: does SynModuleOrNamespaceKind.AnonModule replace this check?
isModule moduleKind && longIdent |> List.forall (fun ident -> zeroLengthRange ident.idRange)
match moduleKind with
| SynModuleOrNamespaceKind.AnonModule -> true
| _ when isModule moduleKind ->
// Fallback check for older compiler versions
longIdent |> List.forall (fun ident -> zeroLengthRange ident.idRange)
| _ -> false

type GetIdents<'Item> = AccessControlLevel -> SynPat -> 'Item []

Expand Down
Loading