mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-23 14:15:33 +03:00
Add NoUnoptimizedRecursion rule, with a few known cases that might be possible to fix in the future.
This commit is contained in:
parent
f22abc904e
commit
4907f9c674
@ -10,6 +10,7 @@
|
||||
"elm/json": "1.1.3",
|
||||
"elm/project-metadata-utils": "1.0.1",
|
||||
"jfmengels/elm-review": "2.4.0",
|
||||
"jfmengels/elm-review-performance": "1.0.0",
|
||||
"jfmengels/elm-review-unused": "1.1.8",
|
||||
"sparksp/elm-review-imports": "1.0.0",
|
||||
"stil4m/elm-syntax": "7.2.3"
|
||||
|
@ -13,6 +13,7 @@ when inside the directory containing this file.
|
||||
|
||||
import NoInconsistentAliases
|
||||
import NoModuleOnExposedNames
|
||||
import NoUnoptimizedRecursion
|
||||
import NoUnused.CustomTypeConstructorArgs
|
||||
import NoUnused.CustomTypeConstructors
|
||||
import NoUnused.Dependencies
|
||||
@ -43,6 +44,8 @@ config =
|
||||
|> NoInconsistentAliases.noMissingAliases
|
||||
|> NoInconsistentAliases.rule
|
||||
, NoModuleOnExposedNames.rule
|
||||
, NoUnoptimizedRecursion.rule (NoUnoptimizedRecursion.optOutWithComment "known-unoptimized-recursion")
|
||||
|> Rule.ignoreErrorsForDirectories [ "tests", "src/ElmHtml" ]
|
||||
]
|
||||
|> List.map
|
||||
(\rule ->
|
||||
|
@ -136,6 +136,7 @@ A common use for this is to map your data into your elm-pages view:
|
||||
-}
|
||||
map : (a -> b) -> DataSource a -> DataSource b
|
||||
map fn requestInfo =
|
||||
-- elm-review: known-unoptimized-recursion
|
||||
case requestInfo of
|
||||
RequestError error ->
|
||||
RequestError error
|
||||
@ -222,6 +223,7 @@ combine =
|
||||
-}
|
||||
map2 : (a -> b -> c) -> DataSource a -> DataSource b -> DataSource c
|
||||
map2 fn request1 request2 =
|
||||
-- elm-review: known-unoptimized-recursion
|
||||
case ( request1, request2 ) of
|
||||
( RequestError error, _ ) ->
|
||||
RequestError error
|
||||
|
@ -88,6 +88,7 @@ toString list =
|
||||
|
||||
toString_ : Text -> String
|
||||
toString_ textValue =
|
||||
-- elm-review: known-unoptimized-recursion
|
||||
case textValue of
|
||||
RawText content ->
|
||||
content
|
||||
|
Loading…
Reference in New Issue
Block a user