prontolabs / pronto-rubocop

Pronto runner for Rubocop, ruby code analyzer
MIT License
83 stars 74 forks source link

Is there a way to avoid current patch comparison? Shout out all offences #41

Closed al3rez closed 5 years ago

al3rez commented 5 years ago

Hey, well done with your plugin! but we're having an issue with rubocop offences due to you're compaing current patch added lines to offence lines currently pronto doesn't add any comments for the previous commits or any offences that are not related to the current patch. Would you please explain or is there a way to avoid this? I tried to make PR with a ENV variable but I get duplicate results when I skip .select { |line| line.new_lineno == offence.line }

Thanks

al3rez commented 5 years ago

Also it doesn't consider .rubocop.yml file maybe that's the issue, I'm not sure.

mmozuras commented 5 years ago

@azbshiri hey, thanks for reporting this. But I'm not sure if I understand the issue correctly. Could you give a specific example of when it doesn't work as you would expect?

al3rez commented 5 years ago

@mmozuras I tried to write a prettier plugin for pronto but it turns out I have to somehow get the lines that have issues and use them to return warnings/errors, etc' e.g. I just want to run prettier against a specific kind of files and return error if prettier exists with 1 or vice versa.