mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-11-29 01:24:35 +03:00
Fix applying fixes in the arbitrary files visitor
This commit is contained in:
parent
265d45d1d4
commit
3f6646bb26
@ -4573,7 +4573,7 @@ computeArbitraryFiles reviewOptions project fixedErrors arbitraryFiles remaining
|
||||
( errors, RuleProjectVisitor updatedRule ) =
|
||||
visitor project arbitraryFiles
|
||||
in
|
||||
case standardFindFix reviewOptions project fixedErrors updatedRule.setErrorsForReadme errors of
|
||||
case standardFindFix reviewOptions project fixedErrors updatedRule.setErrorsForArbitraryFiles errors of
|
||||
FoundFixStandard { newProject, newRule, newFixedErrors, step } ->
|
||||
{ project = newProject
|
||||
, ruleProjectVisitors = newRule :: (rest ++ accRules)
|
||||
@ -5574,6 +5574,7 @@ type alias RuleProjectVisitorOperations =
|
||||
, getErrors : () -> List (Error {})
|
||||
, setErrorsForModule : String -> List (Error {}) -> RuleProjectVisitor
|
||||
, setErrorsForElmJson : List (Error {}) -> RuleProjectVisitor
|
||||
, setErrorsForArbitraryFiles : List (Error {}) -> RuleProjectVisitor
|
||||
, setErrorsForReadme : List (Error {}) -> RuleProjectVisitor
|
||||
, setErrorsForDependencies : List (Error {}) -> RuleProjectVisitor
|
||||
, setErrorsForFinalEvaluation : List (Error {}) -> RuleProjectVisitor
|
||||
@ -5604,6 +5605,7 @@ createRuleProjectVisitor schema initialProject ruleData initialCache =
|
||||
, getErrors = \() -> errorsFromCache (finalCacheMarker schema.name hidden.ruleData.ruleId cache)
|
||||
, setErrorsForModule = \filePath newErrors -> raiseCache { cache | moduleContexts = Dict.update filePath (Maybe.map (\entry -> ModuleCache.setErrors newErrors entry)) cache.moduleContexts }
|
||||
, setErrorsForElmJson = \newErrors -> raiseCache { cache | elmJson = ProjectFileCache.setErrors newErrors cache.elmJson }
|
||||
, setErrorsForArbitraryFiles = \newErrors -> raiseCache { cache | arbitraryFiles = ArbitraryFile.setErrors newErrors cache.arbitraryFiles }
|
||||
, setErrorsForReadme = \newErrors -> raiseCache { cache | readme = ProjectFileCache.setErrors newErrors cache.readme }
|
||||
, setErrorsForDependencies = \newErrors -> raiseCache { cache | dependencies = ProjectFileCache.setErrors newErrors cache.dependencies }
|
||||
, setErrorsForFinalEvaluation = \newErrors -> raiseCache { cache | finalEvaluationErrors = EndAnalysisCache.setOutput newErrors cache.finalEvaluationErrors }
|
||||
|
Loading…
Reference in New Issue
Block a user