From 3092d78454ed801801010ef282b8661019656782 Mon Sep 17 00:00:00 2001 From: quobix Date: Wed, 7 Feb 2024 17:36:19 -0500 Subject: [PATCH] Cleaned up experience a little Signed-off-by: quobix --- language-server/server.go | 4 ++++ motor/rule_applicator.go | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/language-server/server.go b/language-server/server.go index b3dd7e03..5fb49ff1 100644 --- a/language-server/server.go +++ b/language-server/server.go @@ -92,6 +92,10 @@ func NewServer(version string, lintRequest *utils.LintFileRequest) *ServerState return nil } + + handler.TextDocumentCompletion = func(context *glsp.Context, params *protocol.CompletionParams) (any, error) { + return nil, nil + } return state } diff --git a/motor/rule_applicator.go b/motor/rule_applicator.go index a37a45b4..f1e0bd25 100644 --- a/motor/rule_applicator.go +++ b/motor/rule_applicator.go @@ -7,6 +7,7 @@ import ( "context" "errors" "fmt" + vacuumUtils "github.com/daveshanley/vacuum/utils" v3 "github.com/pb33f/libopenapi/datamodel/high/v3" "github.com/sourcegraph/conc" "io" @@ -499,8 +500,8 @@ func ApplyRulesToRuleSet(execution *RuleSetExecution) *RuleSetExecutionResult { res := model.RuleFunctionResult{ RuleId: "circular-references", Rule: circularRefRule, - StartNode: cr.Start.Node, - EndNode: cr.LoopPoint.Node, + StartNode: cr.ParentNode, + EndNode: vacuumUtils.BuildEndNode(cr.ParentNode), Message: fmt.Sprintf("circular reference detected from %s", cr.Start.Definition), Path: cr.GenerateJourneyPath(), }