These are chat archives for coala/coala-bears

21st
Apr 2018
Damian Stachura
@damian1996
Apr 21 2018 09:58
@jayvdb Thanks for your help :) I'm hope that I haven't already anything to correct here :) coala/coala-bears#2227
John Vandenberg
@jayvdb
Apr 21 2018 11:00
CI passes?
Ill check in a few hours
Damian Stachura
@damian1996
Apr 21 2018 11:00
Yes, Ci passes :)
Ok, thanks :)
John Vandenberg
@jayvdb
Apr 21 2018 12:37
merged
John Vandenberg
@jayvdb
Apr 21 2018 12:45
@Makman2 , @adhikasp , it would be nice to catch these : any use of process_output_corrected should have a CAN_FIX ..?
Mischa Krüger
@Makman2
Apr 21 2018 12:50
I mean yes, if corrected output is received, then the linter has fixing capabilities
@jayvdb
John Vandenberg
@jayvdb
Apr 21 2018 13:11
can we detect that CAN_FIX wasnt provided in the metadata?
John Vandenberg
@jayvdb
Apr 21 2018 13:28
@Makman2 should process_output_corrected do nothing if the stream is just \n ?
seems silly to have it empty a file because there was 'no' output
this could also help with our Markdown bear problems. If there was an error, the linter can only emit \n on stdout. assuming that means the file should be blanked isnt sensible
John Vandenberg
@jayvdb
Apr 21 2018 13:39
as a safety net, it should just assume it doesnt know what to do with \n, and any bear which wants to zero a file should have to be manually written out long form, not using these helpers, or have some explicit flag to set to say that it really truly does expect the linter to zero the file.
also I am starting to come to the opinion that we should never have pycodestyle_select / pycodestyle_ignore type settings. they are un-aspectable.
or making them be aspect-ed will involve at least as much work as converting the checks to be bool flags
Mischa Krüger
@Makman2
Apr 21 2018 13:51

should process_output_corrected do nothing if the stream is just \n ?

Currently it's expected that the file is cleared. But I agree it's sane to define a safety measure here, usually nobody wants to clear files.

Feel free to file an issue :+1:
Not sure if we should have a setting like allow_file_cleared or so for @linter to still allow such a case

also I am starting to come to the opinion that we should never have pycodestyle_select / pycodestyle_ignore type settings. they are un-aspectable.

Yeah that's definitely not ideal. Workaround would be to define custom aspects for them and try to move away from them on long-term @jayvdb

Mischa Krüger
@Makman2
Apr 21 2018 19:18

can we detect that CAN_FIX wasnt provided in the metadata?

Sorry forgot to answer that. Yeah this is definitely detectable. You want to add an additional check in linters that use those correction-formats to flag if CAN_FIX doesn't have at least one item? @jayvdb

John Vandenberg
@jayvdb
Apr 21 2018 23:46
yup; created coala/coala#5416