Use globalerror

This commit is contained in:
Jeroen Engels 2021-03-06 21:50:45 +01:00
parent 58844c9546
commit 1789110c4a

View File

@ -166,15 +166,13 @@ a = SomeModule.Regex.fromLiteralFunc "^abc$"
"""
|> Review.Test.runWithProjectData project (rule configuration)
|> Review.Test.expectGlobalErrors
[ Review.Test.error
[ Review.Test.globalError
{ message = "Could not find SomeModule.Regex.fromLiteralFunc"
, details =
[ "I want to provide guarantees on the use of this function, but I can't find it. It is likely that it was renamed, which prevents me from giving you these guarantees."
, "You should rename it back or update this rule to the new name. If you do not use the function anymore, remove the rule."
]
, under = "{"
}
|> Review.Test.atExactly { start = { row = 1, column = 1 }, end = { row = 1, column = 2 } }
]
, test "should not report native Regex.fromString with a non-literal string" <|
\_ ->