Remove unused code and dependencies

This commit is contained in:
Jeroen Engels 2020-01-15 09:54:26 +01:00
parent acd63f22dd
commit b654daa301
13 changed files with 5 additions and 43 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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" ] }

View File

@ -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

View File

@ -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)