-
-
Notifications
You must be signed in to change notification settings - Fork 21
[Enhancement] Robocop 6.0 (Robocop + Robotidy) support #411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Our 'base' for running the check for single file/model is still
To use it, you need model of file, path and configuration class. Configuration can be found using config_manager:
|
ConfigManager caches already found config files, so it could be good enhancement for the future to keep it globally and only reload when toml files in project are modified. It may have huge impact on performance as we need to dynamically load rules every time we create config class. This was the case also for old implementation, but we didn't have way of caching found configs. |
I will release 6.0b1 soon with above syntax (current 6.0a3 uses bit different run_check interface, but config_manager handling is the same). |
I have released 6.0b2 which I used for following code snippets. Instead of mutating existing function even further, I would delegate it to another method:
But first I would consider if it's possible to move some imports into top module imports - not sure why they're inside function. But since Robocop imports rules dynamically it may have some effects I didn't consider when using it. Then method for collecting diagnostics (I see now I also created Diagnostic class name.. so there is potentatial clash of names):
There are some blanks / TODO and I didn't test it.. as I don't know how to setup your development environment. But if there is any issue let me know here. |
Upcoming 6.0 Robocop + Robotidy (merged together) is a breaking change that will require rewriting how it's used in RobotCode.
For the linter part, I see your code here:
robotcode/packages/language_server/src/robotcode/language_server/robotframework/parts/robocop_diagnostics.py
Line 99 in f2e2064
We will need something similar, with adjustment to new changes. I will not go in detail on what changed as it's very broad subject - I will mostly focus on achieving at least the same level of integration in Robot Code as before.
We can also use this issue as discussion point what is needed from Robocop to make it easier for RobotCode to support it.
The text was updated successfully, but these errors were encountered: