mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-12-26 11:13:39 +03:00
Do not fail with missing sources if there are modules added through the project
This commit is contained in:
parent
591896492c
commit
17c9c0e30f
@ -322,10 +322,6 @@ interested in project related details, then you should use [`runOnModules`](#run
|
||||
-}
|
||||
runOnModulesWithProjectData : Project -> Rule -> List String -> ReviewResult
|
||||
runOnModulesWithProjectData project rule sources =
|
||||
if List.isEmpty sources then
|
||||
FailedRun ErrorMessage.missingSources
|
||||
|
||||
else
|
||||
let
|
||||
projectWithModules : Project
|
||||
projectWithModules =
|
||||
@ -355,6 +351,10 @@ runOnModulesWithProjectData project rule sources =
|
||||
modules =
|
||||
Project.modules projectWithModules
|
||||
in
|
||||
if List.isEmpty modules then
|
||||
FailedRun ErrorMessage.missingSources
|
||||
|
||||
else
|
||||
case findDuplicateModuleNames Set.empty modules of
|
||||
Just moduleName ->
|
||||
FailedRun <| ErrorMessage.duplicateModuleName moduleName
|
||||
|
Loading…
Reference in New Issue
Block a user