From 8dcc39ec91babb282bff69c80bb7f2bde657677f Mon Sep 17 00:00:00 2001
From: Ryan Roden-Corrent <ryan@rcorre.net>
Date: Tue, 14 Jul 2020 07:11:16 -0400
Subject: Include gdscript warning name in LSP message.

My initial attempt changed this in the gdscript code, which resulted in
a duplicate warning name in the builtin editor. We should just append
the warning name in the LSP instead.

This uses parens to match what is shown in the builtin editor.
---
 modules/gdscript/language_server/gdscript_extend_parser.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'modules/gdscript/language_server')

diff --git a/modules/gdscript/language_server/gdscript_extend_parser.cpp b/modules/gdscript/language_server/gdscript_extend_parser.cpp
index 330530be80..385d5dd7cb 100644
--- a/modules/gdscript/language_server/gdscript_extend_parser.cpp
+++ b/modules/gdscript/language_server/gdscript_extend_parser.cpp
@@ -62,7 +62,7 @@ void ExtendGDScriptParser::update_diagnostics() {
 		const GDScriptWarning &warning = E->get();
 		lsp::Diagnostic diagnostic;
 		diagnostic.severity = lsp::DiagnosticSeverity::Warning;
-		diagnostic.message = warning.get_message();
+		diagnostic.message = "(" + warning.get_name() + "): " + warning.get_message();
 		diagnostic.source = "gdscript";
 		diagnostic.code = warning.code;
 		lsp::Range range;
-- 
cgit v1.2.3