Skip to content

Commit

Permalink
Extract function
Browse files Browse the repository at this point in the history
  • Loading branch information
jfmengels committed Sep 3, 2023
1 parent 2ee409c commit cf2a955
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Review/Rule.elm
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,7 @@ mergeModuleVisitorsHelp ruleName_ initialProjectContext moduleContextCreator vis
)
emptyModuleVisitor
visitors
|> (\(ModuleRuleSchema moduleVisitorSchema) -> ModuleRuleSchema moduleVisitorSchema)
|> removeExtensibleRecordFromModuleRuleSchema
, moduleContextCreator
)

Expand Down Expand Up @@ -1408,7 +1408,12 @@ removeExtensibleRecordTypeVariable :
(ModuleRuleSchema {} moduleContext -> ModuleRuleSchema { a | hasAtLeastOneVisitor : () } moduleContext)
-> (ModuleRuleSchema {} moduleContext -> ModuleRuleSchema { hasAtLeastOneVisitor : () } moduleContext)
removeExtensibleRecordTypeVariable function =
function >> (\(ModuleRuleSchema param) -> ModuleRuleSchema param)
function >> removeExtensibleRecordFromModuleRuleSchema


removeExtensibleRecordFromModuleRuleSchema : ModuleRuleSchema schemaState moduleContext -> ModuleRuleSchema a moduleContext
removeExtensibleRecordFromModuleRuleSchema (ModuleRuleSchema param) =
ModuleRuleSchema param


{-| Creates a rule that will **only** report a configuration error, which stops `elm-review` from reviewing the project
Expand Down

0 comments on commit cf2a955

Please sign in to comment.