mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-11-23 23:05:35 +03:00
Rename runMulti* to runOnModules*
This commit is contained in:
parent
3bd94e4127
commit
c2ea2f8136
@ -1,5 +1,5 @@
|
||||
module Review.Test exposing
|
||||
( ReviewResult, run, runWithProjectData, runMulti, runMultiWithProjectData
|
||||
( ReviewResult, run, runWithProjectData, runOnModules, runOnModulesWithProjectData
|
||||
, ExpectedError, expectErrors, expectErrorsForModules, expectNoErrors, error, atExactly, whenFixed
|
||||
)
|
||||
|
||||
@ -95,7 +95,7 @@ for this module.
|
||||
|
||||
# Running tests
|
||||
|
||||
@docs ReviewResult, run, runWithProjectData, runMulti, runMultiWithProjectData
|
||||
@docs ReviewResult, run, runWithProjectData, runOnModules, runOnModulesWithProjectData
|
||||
|
||||
|
||||
# Making assertions
|
||||
@ -231,7 +231,7 @@ interested in project related details, then you should use [`run`](#run) instead
|
||||
-}
|
||||
runWithProjectData : Project -> Rule -> String -> ReviewResult
|
||||
runWithProjectData project rule source =
|
||||
runMultiWithProjectData project rule [ source ]
|
||||
runOnModulesWithProjectData project rule [ source ]
|
||||
|
||||
|
||||
codeInspectorForSource : File.ParsedFile -> CodeInspector
|
||||
@ -244,15 +244,15 @@ codeInspectorForSource file =
|
||||
|
||||
{-| TODO documentation
|
||||
-}
|
||||
runMulti : Rule -> List String -> ReviewResult
|
||||
runMulti rule sources =
|
||||
runMultiWithProjectData Project.new rule sources
|
||||
runOnModules : Rule -> List String -> ReviewResult
|
||||
runOnModules rule sources =
|
||||
runOnModulesWithProjectData Project.new rule sources
|
||||
|
||||
|
||||
{-| TODO documentation
|
||||
-}
|
||||
runMultiWithProjectData : Project -> Rule -> List String -> ReviewResult
|
||||
runMultiWithProjectData project rule sources =
|
||||
runOnModulesWithProjectData : Project -> Rule -> List String -> ReviewResult
|
||||
runOnModulesWithProjectData project rule sources =
|
||||
case parseSources sources of
|
||||
Ok parsedFiles ->
|
||||
case findDuplicateModuleNames Set.empty parsedFiles of
|
||||
|
@ -257,7 +257,7 @@ module A exposing (..)
|
||||
module B exposing (..)
|
||||
-- someCode
|
||||
\"\"\" ]
|
||||
|> Review.Test.runMulti rule
|
||||
|> Review.Test.runOnModules rule
|
||||
|> Review.Test.expectErrorsForModules
|
||||
[ ( "B", [ Review.Test.error someError ] )
|
||||
]"""
|
||||
|
@ -629,7 +629,7 @@ module A exposing (..)
|
||||
module B exposing (..)
|
||||
-- someCode
|
||||
\"\"\" ]
|
||||
|> Review.Test.runMulti rule
|
||||
|> Review.Test.runOnModules rule
|
||||
|> Review.Test.expectErrorsForModules
|
||||
[ ( "B", [ Review.Test.error someError ] )
|
||||
]"""
|
||||
|
@ -78,7 +78,7 @@ module OtherModule exposing (..)
|
||||
a = 1
|
||||
"""
|
||||
]
|
||||
|> Review.Test.runMultiWithProjectData application rule
|
||||
|> Review.Test.runOnModulesWithProjectData application rule
|
||||
|> Review.Test.expectNoErrors
|
||||
, test "should report a module when it is never used" <|
|
||||
\() ->
|
||||
@ -95,7 +95,7 @@ module Other.Reported exposing (..)
|
||||
a = 1
|
||||
"""
|
||||
]
|
||||
|> Review.Test.runMultiWithProjectData application rule
|
||||
|> Review.Test.runOnModulesWithProjectData application rule
|
||||
|> Review.Test.expectErrorsForModules
|
||||
[ ( "Reported"
|
||||
, [ Review.Test.error
|
||||
|
Loading…
Reference in New Issue
Block a user