Re-use module documentation from AvailableData

This commit is contained in:
Jeroen Engels 2023-04-01 11:42:03 +02:00
parent 46c42ca738
commit eb62fa6fc5

View File

@ -5123,15 +5123,11 @@ visitModuleForProjectRule module_ availableData ruleModuleVisitors =
ast : File
ast =
ProjectModule.ast module_
moduleDocumentation : Maybe (Node String)
moduleDocumentation =
findModuleDocumentation ast
in
ruleModuleVisitors
|> List.map (\createRuleVisitor -> createRuleVisitor availableData)
|> List.map (\acc -> runVisitor .moduleDefinitionVisitor ast.moduleDefinition acc)
|> List.map (\acc -> runVisitor .moduleDocumentationVisitor moduleDocumentation acc)
|> List.map (\acc -> runVisitor .moduleDocumentationVisitor availableData.moduleDocumentation acc)
|> List.map (\acc -> runVisitor .commentVisitor ast.comments acc)
|> List.map (\acc -> runVisitor .importsVisitor ast.imports acc)
|> List.map (\acc -> runVisitor .declarationListVisitor ast.declarations acc)