Skip to content

Commit f71d15d

Browse files
committed
fix(formatting): improve message clarity for robocop formatting
1 parent ef8eb34 commit f71d15d

File tree

1 file changed

+7
-6
lines changed
  • packages/language_server/src/robotcode/language_server/robotframework/parts

1 file changed

+7
-6
lines changed

packages/language_server/src/robotcode/language_server/robotframework/parts/formatting.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(self, parent: "RobotLanguageServerProtocol") -> None:
3939
self.line_separator = os.linesep
4040
self.short_test_name_length = 18
4141
self.setting_and_variable_name_length = 14
42-
self.robocop_installed_message_shown = False
42+
self.is_robocop_notification_shown = False
4343

4444
def get_tidy_config(self, document: TextDocument) -> RoboTidyConfig:
4545
folder = self.parent.workspace.get_workspace_folder(document.uri)
@@ -65,14 +65,15 @@ def format(
6565
**further_options: Any,
6666
) -> Optional[List[TextEdit]]:
6767
if (get_robot_version() >= (5, 0)) and self.robocop_installed and self.robocop_version >= (6, 0):
68-
if not self.robocop_installed_message_shown and self.robotidy_installed:
68+
if not self.is_robocop_notification_shown and self.robotidy_installed:
6969
self.parent.window.show_message(
70-
"`robotframework-robocop >= 6.0` is installed and will be used for formatting.\n"
71-
"`robotframework-tidy` is also detected in the workspace. "
72-
"It is not needed as `robocop` handles formatting tasks.\n",
70+
"`robotframework-robocop >= 6.0` is installed and will be used for formatting.\n\n"
71+
"`robotframework-tidy` is also detected in the workspace, but its use is redundant.\n"
72+
"Robocop fully supports all formatting tasks and provides a more comprehensive solution.\n\n"
73+
"Note: The use of `robotframework-tidy` is deprecated and should be avoided in favor of Robocop.",
7374
MessageType.INFO,
7475
)
75-
self.robocop_installed_message_shown = True
76+
self.is_robocop_notification_shown = True
7677

7778
return self.format_robocop(document, options, **further_options)
7879

0 commit comments

Comments
 (0)