mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-09-20 04:27:25 +03:00
Improve reviewV2's error message too
This commit is contained in:
parent
e4df0e01ee
commit
cb6c13e645
@ -558,18 +558,15 @@ getModulesSortedByImport project =
|
||||
findCycle moduleGraph edge
|
||||
|> List.reverse
|
||||
in
|
||||
[ Review.Error.ReviewError
|
||||
{ filePath = "GLOBAL ERROR"
|
||||
, ruleName = "Incorrect project"
|
||||
, message = "Import cycle discovered"
|
||||
[ globalError
|
||||
{ message = "Your module imports form a cycle:"
|
||||
, details =
|
||||
[ "I detected an import cycle in your project. This prevents me from working correctly, and results in a error for the Elm compiler anyway. Please resolve it using the compiler's suggestions, then try running `elm-review` again."
|
||||
[ "Learn more about why this is disallowed and how to break cycles here:<https://elm-lang.org/0.19.1/import-cycles>"
|
||||
, printCycle cycle
|
||||
]
|
||||
, range = { start = { row = 0, column = 0 }, end = { row = 0, column = 0 } }
|
||||
, fixes = Nothing
|
||||
, target = Review.Error.Global
|
||||
}
|
||||
|> setRuleName "Incorrect project"
|
||||
|> errorToReviewError
|
||||
]
|
||||
)
|
||||
sortedModules
|
||||
|
Loading…
Reference in New Issue
Block a user