boakley / robotframework-lint

Linter for robot framework plain text files
Apache License 2.0
126 stars 48 forks source link

xml/junit/json output - was: integration with RED - Robot Editor #33

Open KrzysztofJozefowicz opened 8 years ago

KrzysztofJozefowicz commented 8 years ago

Hi Thanks for good work! As a RED Robot Editor (https://github.com/nokia/RED) team, we have plans to provide users with similar functionality. It seems reasonable to allow integration of lint with RED to show affected lines directly in UI. We would like to use API for that instead of parsing text report. Do you plan to provide such function?

boakley commented 8 years ago

I have no plans to support an API in rflint, but it should be very easy to implement. All rule output, for example, goes though the method report of the RFLint object, and the processing of a single file is done by a single function. You could easily override the output function and have it write to a socket, or simply gather the results and return them when processing is finished.

What sort of API are you wanting? Are you wanting to run it as a server with a REST API, or do you just need to use it as a module that you can call from some other python code?

On Fri, Jun 17, 2016 at 1:52 AM, Krzysztof Jozefowicz < notifications@github.com> wrote:

Hi Thanks for good work! As a RED Robot Editor (https://github.com/nokia/RED) team, we have plans to provide users with similar functionality. It seems reasonable to allow integration of lint with RED to show affected lines directly in UI. We would like to use API for that instead of parsing text report. Do you plan to provide such function?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/boakley/robotframework-lint/issues/33, or mute the thread https://github.com/notifications/unsubscribe/ABEmYoFaOTG-eqrx0ySl7YdBpYcaUSFgks5qMkQzgaJpZM4I4FEC .

KrzysztofJozefowicz commented 8 years ago

Hi Thanks for reply, for now we will use rflint output as-is, if we will need anything more we will provide pull requests.

boakley commented 8 years ago

Ok. I toyed around with providing an API, and it looks like it would be pretty easy. If you decide you need a different output format, or want to wrap the whole thing in a RESTful service, that should be pretty easy to do.

On Thu, Jun 30, 2016 at 7:19 AM, Krzysztof Jozefowicz < notifications@github.com> wrote:

Hi Thanks for reply, for now we will use rflint output as-is, if we will need anything more we will provide pull requests.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/boakley/robotframework-lint/issues/33#issuecomment-229641867, or mute the thread https://github.com/notifications/unsubscribe/ABEmYglE2JhYj0Ibb-4wawSfJA6H9lpLks5qQ7RXgaJpZM4I4FEC .

KrzysztofJozefowicz commented 7 years ago

Hi Bryan Coming back with output API in regards of https://github.com/nokia/RED/issues/116 (integration rflint in RED). Are you able to provide xml/junit/json output for rf-lint? This would be useful in Jenkins(several teams in Nokia already do this as a verification step) but also RED would use it as standardize way to display output (errors/warinings and markers) in RED editors and in Problems view.

Is it already available by --format /-f switch as I could not find any info.

boakley commented 7 years ago

I do not provide xml output. It would be fairly easy for you to write a wrapper around rflint that generates any sort of output that you want. A year ago I responded to this thread with an example.

On Tue, Jun 13, 2017 at 4:19 AM, Krzysztof Jozefowicz < notifications@github.com> wrote:

Hi Bryan Coming back with output API in regards of nokia/RED#116 https://github.com/nokia/RED/issues/116 (integration rflint in RED). Are you able to provide xml/junit output for rf-lint? This would be useful in Jenkins(several teams in Nokia already do this as a verification step) but also RED would use it as standardize way to display output (errors/warinings and markers) in RED editors and in Problems view.

Is it already available by --format /-f switch as I could not find any info.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/boakley/robotframework-lint/issues/33#issuecomment-308057757, or mute the thread https://github.com/notifications/unsubscribe-auth/ABEmYrR2zN4e6EfYYQfGTJ64TOFDTaj6ks5sDlQrgaJpZM4I4FEC .

KrzysztofJozefowicz commented 7 years ago

fair enough, we will investigate it on our side.

boakley commented 7 years ago

It wouldn't be too hard to add a --xml format option, or perhaps let you specify a formatter class, it's just that I don't have a whole lot of time to devote to rflint right now. I'll be happy to consider a pull request.

On Tue, Jun 13, 2017 at 7:26 AM, Krzysztof Jozefowicz < notifications@github.com> wrote:

fair enough, we will investigate it on our side.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/boakley/robotframework-lint/issues/33#issuecomment-308099592, or mute the thread https://github.com/notifications/unsubscribe-auth/ABEmYsgWZfOoCoHp977uvBAfg9EmEzL5ks5sDoAFgaJpZM4I4FEC .