bhirsz / robotframework-cop-academy

Tool for static code analysis and formatting of Robot Framework language
Apache License 2.0
2 stars 0 forks source link

[Design] Integrations & reports #6

Open bhirsz opened 3 weeks ago

bhirsz commented 3 weeks ago

Overview One of the main goals of new robocop is improving user experience. Users typically do the following actions with the tool:

Robocop can be just executed in the pipeline and it will work the same it's working in the local environment when used manually - found issues / modified code will be printed and tool will return non-0 exit code. More advanced users hovewer are looking for closer integration, for example for loading robocop reports into pipeline reporting system to show errors summary / or show errors directly in the code.

There is basic documentation (and support) for such integrations in Robocop: https://robocop.readthedocs.io/en/stable/ci.html . We also offer sarif report, which is commonly used by multiple platforms as linting output format. Not all tools use this format hovewer, or use it in different version / not supported modifications.

Proposal

Create easy to understand documentation with examples how to use Robocop in each major CI/CD or similar platform, including:

Robocop should be able to produce output in the format supported by given platform. We can reuse reports for that purpose (similarly as currently we are producing sarif reports). Each report should use name of platform as its name:

robocop check --reports gitlab
robocop check --reports sonarqube

Testing

This feature will require acceptance testing done with the actual system. We will use our work CI/CD and ask community for missing ones.

Maintenance

As we are not able to keep up with all the changes, maintaining support will rely on the users who use the tool and will report if Robocop stops working. If the new supported format is released with the breaking changes, we can use reports arguments to configure it:

robocop check --reports github --configure github.version=2
bhirsz commented 3 weeks ago

As optional enhancement, we can also look into:

bhirsz commented 2 weeks ago

Additionaly example setup for precommits should be described in the docs