mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-11-22 13:15:59 +03:00
Remove unused code and dependencies
This commit is contained in:
parent
acd63f22dd
commit
b654daa301
@ -9,7 +9,7 @@ import NoUnused.CustomTypeConstructors
|
||||
import NoUnused.Variables
|
||||
import Reporter
|
||||
import Review
|
||||
import Review.File exposing (ParsedFile, RawFile)
|
||||
import Review.File exposing (RawFile)
|
||||
import Review.Project as Project
|
||||
import Review.Rule as Rule exposing (Rule)
|
||||
|
||||
|
@ -18,7 +18,6 @@ import Elm.Project exposing (Project)
|
||||
import Elm.Syntax.Declaration as Declaration exposing (Declaration)
|
||||
import Elm.Syntax.Exposing as Exposing
|
||||
import Elm.Syntax.Expression as Expression exposing (Expression)
|
||||
import Elm.Syntax.Import exposing (Import)
|
||||
import Elm.Syntax.Module as Module exposing (Module)
|
||||
import Elm.Syntax.ModuleName exposing (ModuleName)
|
||||
import Elm.Syntax.Node as Node exposing (Node)
|
||||
|
@ -14,7 +14,6 @@ import Elm.Module
|
||||
import Elm.Project exposing (Project)
|
||||
import Elm.Syntax.Declaration as Declaration exposing (Declaration)
|
||||
import Elm.Syntax.Import exposing (Import)
|
||||
import Elm.Syntax.Module as Module exposing (Module)
|
||||
import Elm.Syntax.ModuleName exposing (ModuleName)
|
||||
import Elm.Syntax.Node as Node exposing (Node)
|
||||
import Elm.Syntax.Range exposing (Range)
|
||||
|
@ -136,10 +136,3 @@ pop (Nonempty x xs) =
|
||||
mapHead : (a -> a) -> Nonempty a -> Nonempty a
|
||||
mapHead fn (Nonempty x xs) =
|
||||
Nonempty (fn x) xs
|
||||
|
||||
|
||||
{-| Exchange the head element while leaving the tail alone.
|
||||
-}
|
||||
replaceHead : a -> Nonempty a -> Nonempty a
|
||||
replaceHead y (Nonempty x xs) =
|
||||
Nonempty y xs
|
||||
|
@ -9,10 +9,6 @@ module Review exposing (review)
|
||||
|
||||
-}
|
||||
|
||||
import Elm.Parser as Parser
|
||||
import Elm.Processing exposing (init, process)
|
||||
import Elm.Syntax.File exposing (File)
|
||||
import Review.File exposing (ParsedFile, RawFile)
|
||||
import Review.Project exposing (Project)
|
||||
import Review.Rule as Rule exposing (Error, Rule)
|
||||
|
||||
|
@ -40,9 +40,7 @@ import Elm.Syntax.Module
|
||||
import Elm.Syntax.ModuleName exposing (ModuleName)
|
||||
import Elm.Syntax.Node as Node
|
||||
import Graph exposing (Graph)
|
||||
import IntDict exposing (IntDict)
|
||||
import Review.File exposing (ParsedFile)
|
||||
import Set exposing (Set)
|
||||
|
||||
|
||||
|
||||
|
@ -210,7 +210,7 @@ import Elm.Syntax.ModuleName exposing (ModuleName)
|
||||
import Elm.Syntax.Node as Node exposing (Node)
|
||||
import Elm.Syntax.Range exposing (Range)
|
||||
import Graph exposing (Graph)
|
||||
import IntDict exposing (IntDict)
|
||||
import IntDict
|
||||
import Review.File exposing (ParsedFile, RawFile)
|
||||
import Review.Fix exposing (Fix)
|
||||
import Review.Project exposing (Project)
|
||||
|
@ -1,7 +1,6 @@
|
||||
module NoHtmlButtonTest exposing (all)
|
||||
|
||||
import Dependencies
|
||||
import Elm.Type as Type
|
||||
import NoHtmlButton exposing (rule)
|
||||
import Review.Project as Project exposing (Project)
|
||||
import Review.Test exposing (ReviewResult)
|
||||
|
@ -1,17 +1,14 @@
|
||||
module NoUnusedExportsTest exposing (all)
|
||||
|
||||
import Dependencies
|
||||
import Elm.Constraint
|
||||
import Elm.License
|
||||
import Elm.Module
|
||||
import Elm.Package
|
||||
import Elm.Project
|
||||
import Elm.Type as Type
|
||||
import Elm.Version
|
||||
import Expect
|
||||
import NoUnusedExports exposing (rule)
|
||||
import Review.Project as Project exposing (Project)
|
||||
import Review.Test exposing (ReviewResult)
|
||||
import Review.Test
|
||||
import Test exposing (Test, describe, test)
|
||||
|
||||
|
||||
|
@ -1,17 +1,14 @@
|
||||
module NoUnusedModulesTest exposing (all)
|
||||
|
||||
import Dependencies
|
||||
import Elm.Constraint
|
||||
import Elm.License
|
||||
import Elm.Module
|
||||
import Elm.Package
|
||||
import Elm.Project
|
||||
import Elm.Type as Type
|
||||
import Elm.Version
|
||||
import Expect
|
||||
import NoUnusedModules exposing (rule)
|
||||
import Review.Project as Project exposing (Project)
|
||||
import Review.Test exposing (ReviewResult)
|
||||
import Review.Test
|
||||
import Test exposing (Test, describe, test)
|
||||
|
||||
|
||||
|
@ -55,15 +55,6 @@ all =
|
||||
|> Rule.withFinalEvaluation finalEvaluation
|
||||
|> Rule.fromSchema
|
||||
|
||||
declarationVisitor : String -> Node Expression -> Rule.Direction -> Context -> ( List Rule.Error, Context )
|
||||
declarationVisitor text node direction context =
|
||||
case direction of
|
||||
Rule.OnEnter ->
|
||||
( [], context ++ "\nEnter " ++ text )
|
||||
|
||||
Rule.OnExit ->
|
||||
( [], context ++ "\nExit " ++ text )
|
||||
|
||||
finalEvaluation : Context -> List Rule.Error
|
||||
finalEvaluation context =
|
||||
[ Rule.error { message = context, details = [ "details" ] }
|
||||
|
@ -5,10 +5,9 @@ import Elm.Syntax.Declaration as Declaration exposing (Declaration)
|
||||
import Elm.Syntax.Expression as Expression exposing (Expression)
|
||||
import Elm.Syntax.Node as Node exposing (Node(..))
|
||||
import Elm.Syntax.TypeAnnotation as TypeAnnotation exposing (TypeAnnotation)
|
||||
import Elm.Type
|
||||
import Review.Project as Project exposing (Project)
|
||||
import Review.Rule as Rule exposing (Rule)
|
||||
import Review.Test exposing (ReviewResult)
|
||||
import Review.Test
|
||||
import Scope2 as Scope
|
||||
import Test exposing (Test, test)
|
||||
|
||||
@ -112,11 +111,6 @@ Http.get -> Http.get
|
||||
]
|
||||
|
||||
|
||||
type alias GlobalContext =
|
||||
{ scope : Scope.GlobalContext
|
||||
}
|
||||
|
||||
|
||||
type alias ModuleContext =
|
||||
{ scope : Scope.ModuleContext
|
||||
, text : String
|
||||
|
@ -1,7 +1,6 @@
|
||||
module ScopeTest exposing (all)
|
||||
|
||||
import Dependencies
|
||||
import Elm.Syntax.Declaration exposing (Declaration)
|
||||
import Elm.Syntax.Expression as Expression exposing (Expression)
|
||||
import Elm.Syntax.Node as Node exposing (Node)
|
||||
import Review.Project as Project exposing (Project)
|
||||
|
Loading…
Reference in New Issue
Block a user