mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-11-23 23:05:35 +03:00
Fix running rule once for every test file in Review.Test
This commit is contained in:
parent
9d34ed4746
commit
1141098f32
@ -356,6 +356,13 @@ runOnModulesWithProjectData project rule sources =
|
||||
FailedRun <| ErrorMessage.duplicateModuleName moduleName
|
||||
|
||||
Nothing ->
|
||||
let
|
||||
errors : List Error
|
||||
errors =
|
||||
projectWithModules
|
||||
|> Review.review [ rule ]
|
||||
|> Tuple.first
|
||||
in
|
||||
List.map
|
||||
(\module_ ->
|
||||
{ moduleName =
|
||||
@ -365,9 +372,7 @@ runOnModulesWithProjectData project rule sources =
|
||||
|> String.join "."
|
||||
, inspector = codeInspectorForSource module_
|
||||
, errors =
|
||||
projectWithModules
|
||||
|> Review.review [ rule ]
|
||||
|> Tuple.first
|
||||
errors
|
||||
|> List.filter (\error_ -> Rule.errorFilePath error_ == module_.path)
|
||||
|> List.sortWith compareErrorPositions
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user