mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-11-23 23:05:35 +03:00
Move again
This commit is contained in:
parent
494d376ba6
commit
556a4b24bc
7
src/Review/ModuleNameLookupTable.elm
Normal file
7
src/Review/ModuleNameLookupTable.elm
Normal file
@ -0,0 +1,7 @@
|
||||
module Review.ModuleNameLookupTable exposing (..)
|
||||
|
||||
import Review.ModuleNameLookupTable.Internal as Internal
|
||||
|
||||
|
||||
type alias ModuleNameLookupTable =
|
||||
Internal.ModuleNameLookupTable
|
10
src/Review/ModuleNameLookupTable/Internal.elm
Normal file
10
src/Review/ModuleNameLookupTable/Internal.elm
Normal file
@ -0,0 +1,10 @@
|
||||
module Review.ModuleNameLookupTable.Internal exposing (ModuleNameLookupTable(..), empty)
|
||||
|
||||
|
||||
type ModuleNameLookupTable
|
||||
= ModuleNameLookupTable
|
||||
|
||||
|
||||
empty : ModuleNameLookupTable
|
||||
empty =
|
||||
ModuleNameLookupTable
|
@ -4,7 +4,6 @@ module Review.Project exposing
|
||||
, addElmJson, elmJson
|
||||
, addReadme, readme
|
||||
, addDependency, removeDependencies, dependencies
|
||||
, ModuleNameLookupTable
|
||||
)
|
||||
|
||||
{-| Represents the contents of the project to be analyzed. This information will
|
||||
@ -80,10 +79,6 @@ new =
|
||||
}
|
||||
|
||||
|
||||
type alias ModuleNameLookupTable =
|
||||
Internal.ModuleNameLookupTable
|
||||
|
||||
|
||||
|
||||
-- PROJECT FILES
|
||||
|
||||
@ -245,6 +240,7 @@ precomputeModuleGraph ((Internal.Project p) as project) =
|
||||
project
|
||||
|
||||
Nothing ->
|
||||
--|> Internal.Project.compute
|
||||
Internal.Project { p | moduleGraph = Just <| Internal.buildModuleGraph <| Dict.values p.modules }
|
||||
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
module Review.Project.Internal exposing
|
||||
( ModuleNameLookupTable
|
||||
, Project(..)
|
||||
( Project(..)
|
||||
, ProjectModule
|
||||
, buildModuleGraph
|
||||
, moduleGraph
|
||||
@ -17,6 +16,7 @@ import Elm.Syntax.File
|
||||
import Elm.Syntax.Module
|
||||
import Elm.Syntax.ModuleName exposing (ModuleName)
|
||||
import Elm.Syntax.Node as Node
|
||||
import Review.ModuleNameLookupTable exposing (ModuleNameLookupTable)
|
||||
import Review.Project.Dependency exposing (Dependency)
|
||||
import Vendor.Graph as Graph exposing (Graph)
|
||||
|
||||
@ -44,10 +44,6 @@ type alias ProjectModule =
|
||||
}
|
||||
|
||||
|
||||
type alias ModuleNameLookupTable =
|
||||
()
|
||||
|
||||
|
||||
{-| Get the module graph for the project in the form of a
|
||||
[`elm-community/graph` Graph]. This is used by `Review.Rule` internally.
|
||||
|
||||
|
@ -266,7 +266,9 @@ import Elm.Syntax.Range as Range exposing (Range)
|
||||
import Review.Error exposing (InternalError)
|
||||
import Review.Exceptions as Exceptions exposing (Exceptions)
|
||||
import Review.Fix exposing (Fix)
|
||||
import Review.Project exposing (ModuleNameLookupTable, Project, ProjectModule)
|
||||
import Review.ModuleNameLookupTable exposing (ModuleNameLookupTable)
|
||||
import Review.ModuleNameLookupTable.Internal as ModuleNameLookupTableInternal
|
||||
import Review.Project exposing (Project, ProjectModule)
|
||||
import Review.Project.Dependency
|
||||
import Review.Project.Internal
|
||||
import Set exposing (Set)
|
||||
@ -866,6 +868,7 @@ mergeModuleVisitors initialProjectContext maybeModuleContextCreator visitors =
|
||||
, isInSourceDirectories = True
|
||||
}
|
||||
, moduleKey = ModuleKey "dummy"
|
||||
, moduleNameLookupTable = ModuleNameLookupTableInternal.empty
|
||||
}
|
||||
|
||||
initialModuleContext : moduleContext
|
||||
@ -3342,6 +3345,7 @@ computeModules projectVisitor ( moduleVisitor, moduleContextCreator ) project ex
|
||||
availableData =
|
||||
{ metadata = metadata
|
||||
, moduleKey = moduleKey
|
||||
, moduleNameLookupTable = ModuleNameLookupTableInternal.empty
|
||||
}
|
||||
|
||||
initialModuleContext : moduleContext
|
||||
@ -3833,7 +3837,7 @@ withMetadata (ContextCreator fn (RequestedData requested)) =
|
||||
withModuleNameLookupTable : ContextCreator ModuleNameLookupTable (from -> to) -> ContextCreator from to
|
||||
withModuleNameLookupTable (ContextCreator fn (RequestedData requested)) =
|
||||
ContextCreator
|
||||
(\data -> fn data ())
|
||||
(\data -> fn data data.moduleNameLookupTable)
|
||||
(RequestedData { requested | moduleNameLookupTable = True })
|
||||
|
||||
|
||||
@ -3862,6 +3866,7 @@ withModuleKey (ContextCreator fn (RequestedData requested)) =
|
||||
type alias AvailableData =
|
||||
{ metadata : Metadata
|
||||
, moduleKey : ModuleKey
|
||||
, moduleNameLookupTable : ModuleNameLookupTable
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@ module MiscRules.NoHtmlButton exposing (rule)
|
||||
|
||||
import Elm.Syntax.Expression exposing (Expression(..))
|
||||
import Elm.Syntax.Node as Node exposing (Node)
|
||||
import Review.Project exposing (ModuleNameLookupTable)
|
||||
import Review.ModuleNameLookupTable exposing (ModuleNameLookupTable)
|
||||
import Review.Rule as Rule exposing (Error, Rule)
|
||||
import Scope
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user