enkessler / cuke_linter

A linting tool for Cucumber
MIT License
32 stars 8 forks source link

Questions about custom linter #17

Closed pauloantunes001 closed 4 years ago

pauloantunes001 commented 4 years ago

Hi, I created an example of a simple custom linter based on this page (https://github.com/enkessler/cuke_linter). When I execute the code, it generates an alternative external file with the execution report (my_linter_reports.txt). But a normal execution of cuke_linter generates it too in another file based on the config.xml file (cuke_linter_reports.txt), Is there a way to combine both results in just one file?

enkessler commented 4 years ago

Because all formatters will receive the same data, there should be no need to combine multiple copies of the same report into one. Unless you are talking about combing reports from two different executions or something like that?

As to why you are ending up with two copies in the first place, I'm not sure. By default, data will only be output to the console. It would take explicit code arguments to use other formatters or output locations. So, while the sample code that you linked would create a single text file, a 'normal' execution of cuke_linter would not produce any report files at all. I'm curious how you are running the tool and what arguments you are providing it.

Finally, I don't recall that configuration even exists for anything besides individual linters, so I don't know why the presence of custom configuration would make a difference to the formatters used or the location that they output to. Also, the config files aren't in XML format, so now I'm really lost.

pauloantunes001 commented 4 years ago

It was the combination of two executions in one, but I already solved the problem.

I am executing only one with all the necessary linter.

Thanks!

enkessler commented 4 years ago

You're quite welcome!