mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-11-27 02:19:27 +03:00
Pass additional argument
This commit is contained in:
parent
c32689a730
commit
ece891ccdc
@ -4415,25 +4415,25 @@ computeReadme reviewOptions project ruleProjectVisitors fixedErrors =
|
||||
)
|
||||
(ValidProject.readme project)
|
||||
in
|
||||
computeReadmeHelp reviewOptions project readmeData ruleProjectVisitors fixedErrors
|
||||
computeReadmeHelp reviewOptions project readmeData ruleProjectVisitors fixedErrors []
|
||||
|
||||
|
||||
computeReadmeHelp : ReviewOptionsData -> ValidProject -> Maybe { readmeKey : ReadmeKey, content : String } -> List RuleProjectVisitor -> FixedErrors -> { project : ValidProject, step : Step, ruleProjectVisitors : List RuleProjectVisitor, fixedErrors : FixedErrors }
|
||||
computeReadmeHelp reviewOptions project readmeData ruleProjectVisitors fixedErrors =
|
||||
computeReadmeHelp : ReviewOptionsData -> ValidProject -> Maybe { readmeKey : ReadmeKey, content : String } -> List RuleProjectVisitor -> FixedErrors -> List RuleProjectVisitor -> { project : ValidProject, step : Step, ruleProjectVisitors : List RuleProjectVisitor, fixedErrors : FixedErrors }
|
||||
computeReadmeHelp reviewOptions project readmeData ruleProjectVisitors fixedErrors accRules =
|
||||
let
|
||||
( errors, newRuleProjectVisitors ) =
|
||||
List.foldl
|
||||
(\((RuleProjectVisitor rule) as untouched) ( accErrors, accRules ) ->
|
||||
(\((RuleProjectVisitor rule) as untouched) ( accErrors, accRules_ ) ->
|
||||
case rule.readmeVisitor of
|
||||
Just visitor ->
|
||||
let
|
||||
( newErrors, updatedRule ) =
|
||||
visitor project readmeData
|
||||
in
|
||||
( List.append newErrors accErrors, updatedRule :: accRules )
|
||||
( List.append newErrors accErrors, updatedRule :: accRules_ )
|
||||
|
||||
Nothing ->
|
||||
( accErrors, untouched :: accRules )
|
||||
( accErrors, untouched :: accRules_ )
|
||||
)
|
||||
( [], [] )
|
||||
ruleProjectVisitors
|
||||
|
Loading…
Reference in New Issue
Block a user