From f5cf817169fdb9eabf42f2f93156a0eddbbaf2d3 Mon Sep 17 00:00:00 2001 From: Jeroen Engels Date: Sat, 15 Apr 2023 08:02:47 +0200 Subject: [PATCH] Remove outdated TODOs --- src/Review/ModuleNameLookupTable/Compute.elm | 2 -- src/Review/Rule.elm | 10 +--------- tests/Util.elm | 2 -- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/Review/ModuleNameLookupTable/Compute.elm b/src/Review/ModuleNameLookupTable/Compute.elm index 9eaf04ea..bb26514e 100644 --- a/src/Review/ModuleNameLookupTable/Compute.elm +++ b/src/Review/ModuleNameLookupTable/Compute.elm @@ -76,8 +76,6 @@ emptyScope = compute : ModuleName -> OpaqueProjectModule -> ValidProject -> ( ModuleNameLookupTable, ValidProject ) compute moduleName module_ project = - -- TODO Reuse cache if the file has not changed. Maybe already done properly - -- TODO Skip computing the lookup table if no rule requires it, but still compute the modules and dependenciesModules let projectCache : ProjectCache projectCache = diff --git a/src/Review/Rule.elm b/src/Review/Rule.elm index cf69acd0..af39f8f5 100644 --- a/src/Review/Rule.elm +++ b/src/Review/Rule.elm @@ -1185,7 +1185,6 @@ type alias ProjectRuleSchemaData projectContext moduleContext = type TraversalType = AllModulesInParallel - -- TODO Add way to traverse in opposite order | ImportedModulesFirst @@ -5454,8 +5453,6 @@ createRuleProjectVisitor schema initialProject ruleData initialCache = , finalProjectEvaluation = createFinalProjectEvaluationVisitor schema hidden.ruleData raiseCache cache , dataExtractVisitor = createDataExtractVisitor schema raiseCache cache , getErrorsForModule = \filePath -> getErrorsForModule cache filePath - - -- TODO This is called at the wrong moment: This contains the state of the project with fixes that haven't been applied. , getErrors = \() -> errorsFromCache (finalCacheMarker schema.name hidden.ruleData.ruleId cache) , setErrorsForModule = \filePath newErrors -> raiseCache { cache | moduleContexts = Dict.update filePath (Maybe.map (\entry -> ModuleCache.setErrors newErrors entry)) cache.moduleContexts } , setErrorsForElmJson = \newErrors -> raiseCache { cache | elmJson = ProjectFileCache.setErrors newErrors cache.elmJson } @@ -6152,7 +6149,7 @@ accumulate params visitor ( previousErrors, previousContext ) = -- INITIALIZING WITH CONTEXT --- TODO Move this to a different module later on +-- TODO Breaking change: Move this to a different module later on {-| Create a module context from a project context or the other way around. @@ -6183,7 +6180,6 @@ requestedDataFromContextCreator (ContextCreator _ requestedData) = -} initContextCreator : (from -> to) -> ContextCreator from to initContextCreator fromProjectToModule = - -- TODO Try to get rid of the ()/from when using in a module rule ContextCreator (\_ _ -> fromProjectToModule) RequestedData.none @@ -6594,7 +6590,3 @@ fixedError fixedErrors data = , ( "filePath", Encode.string data.filePath ) , ( "count", Encode.int (FixedErrors.count fixedErrors) ) ] - - - --- TODO Check that rules have a RequestedData relevant only to their implementatio, and not the combined one for all. diff --git a/tests/Util.elm b/tests/Util.elm index 2dc42e6f..b460ec77 100644 --- a/tests/Util.elm +++ b/tests/Util.elm @@ -9,8 +9,6 @@ import Elm.Writer as Writer expressionToString : Range -> Expression -> String expressionToString range expr = Node.Node range expr - -- Writer expects a slightly different AST than parsing produces - -- TODO: log issue! |> fixAst |> Writer.writeExpression |> Writer.write