From f771ef15409bb98ff6b9dcbca2f424001ada4fa2 Mon Sep 17 00:00:00 2001 From: Jeroen Engels Date: Fri, 5 Jul 2019 00:46:56 +0200 Subject: [PATCH] Remove Debug and make range printing more consistent --- src/Lint/Test.elm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Lint/Test.elm b/src/Lint/Test.elm index e811721b..14a24e52 100644 --- a/src/Lint/Test.elm +++ b/src/Lint/Test.elm @@ -492,16 +492,16 @@ positionAsRange (SourceCode sourceCode) under position = } +errorToString : Error -> String +errorToString error_ = + "- \"" ++ Rule.errorMessage error_ ++ "\" at " ++ rangeAsString (Rule.errorRange error_) + + rangeAsString : Range -> String rangeAsString { start, end } = "{ start = { row = " ++ String.fromInt start.row ++ ", column = " ++ String.fromInt start.column ++ " }, end = { row = " ++ String.fromInt end.row ++ ", column = " ++ String.fromInt end.column ++ " } }" -errorToString : Error -> String -errorToString error_ = - "- \"" ++ Rule.errorMessage error_ ++ "\" at " ++ Debug.toString (Rule.errorRange error_) - - notEnoughErrors : ExpectedError -> List ExpectedError -> String notEnoughErrors expected restOfExpectedErrors = let