robocorp / robotframework-lsp

Robocorp extensions for VS Code: Robocorp Code and RFW LSP
https://robocorp.com/docs/developer-tools/visual-studio-code
Apache License 2.0
206 stars 93 forks source link

Robocop displayed message #604

Open bhirsz opened 2 years ago

bhirsz commented 2 years ago

I was finally able to start LSP plugin in my Intellij (I will report separately what was the issue). I see now how the error messages looks like:

image

Is there any option to configure it? Some users could be be lost on what particular message means, or where it comes from (from robocop), how to disable this (missing rule id or rule name). Additionally starting from 2.0 I will be including link to extended documentation on rule in lsp diagnostic: https://github.com/MarketSquare/robotframework-robocop/blob/06b6b3edb6ab47bfd45f2fe055863cdcaf30469b/robocop/utils/misc.py#L120 This could be handy in improving the displayed message.

fabioz commented 2 years ago

The way it runs is that it provides just the message Robocop itself provides.

To see the related code you can see:

Integration LSP -> Intellij https://github.com/robocorp/robotframework-lsp/blob/master/robotframework-intellij/src/main/java/robocorp/lsp/intellij/FeatureDiagnostics.java#L56

Integration LSP -> Robocop https://github.com/robocorp/robotframework-lsp/blob/master/robocorp-python-ls-core/src/robocorp_ls_core/robocop_wrapper.py#L48

I guess that the FeatureDiagnostics.java could really be improved to add more information for Intellij.