mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-11-30 13:32:03 +03:00
Move let declaration closer to where it's used
This commit is contained in:
parent
d3275d6fb1
commit
aab719af66
@ -4657,15 +4657,6 @@ computeModule ({ ruleProjectVisitors, module_, project, incoming } as params) =
|
||||
moduleName =
|
||||
Node.value (moduleNameNode (ProjectModule.ast module_).moduleDefinition)
|
||||
|
||||
( moduleNameLookupTable, newProject ) =
|
||||
-- TODO Try to compute this later, once we know for sure that the rules we will run want the lookup table
|
||||
-- TODO If the file has changed, then compute the module docs anyway.
|
||||
if requestedData.moduleNameLookupTable then
|
||||
Review.ModuleNameLookupTable.Compute.compute moduleName module_ project
|
||||
|
||||
else
|
||||
( ModuleNameLookupTableInternal.empty moduleName, project )
|
||||
|
||||
filePath : String
|
||||
filePath =
|
||||
ProjectModule.path module_
|
||||
@ -4698,6 +4689,15 @@ computeModule ({ ruleProjectVisitors, module_, project, incoming } as params) =
|
||||
|
||||
else
|
||||
let
|
||||
( moduleNameLookupTable, newProject ) =
|
||||
-- TODO Try to compute this later, once we know for sure that the rules we will run want the lookup table
|
||||
-- TODO If the file has changed, then compute the module docs anyway.
|
||||
if requestedData.moduleNameLookupTable then
|
||||
Review.ModuleNameLookupTable.Compute.compute moduleName module_ project
|
||||
|
||||
else
|
||||
( ModuleNameLookupTableInternal.empty moduleName, project )
|
||||
|
||||
availableData : AvailableData
|
||||
availableData =
|
||||
{ ast = ProjectModule.ast module_
|
||||
|
Loading…
Reference in New Issue
Block a user