These are chat archives for coala/coala-bears

16th
Jan 2018
Kriti Rohilla
@kriti21
Jan 16 2018 05:51
Also i had run pytest locally and it executed successfully. How to rectify the failing tests? Please help.
Ishan Srivastava
@ishanSrt
Jan 16 2018 05:53
@kriti21 there are still 2 commits to your PR. squash them into one and look into the error log of circle and travis and check why are they failing
Kriti Rohilla
@kriti21
Jan 16 2018 05:54
Ok. Thanks.
Ishan Srivastava
@ishanSrt
Jan 16 2018 05:55
there is no problem with your tests, you have to reach code coverage of 100% on your changes
there is something about pytest --cov --cov-report html in the docs to test your coverage locally
Kriti Rohilla
@kriti21
Jan 16 2018 06:10
Squashed the commits again but it shows circle ci related changes in this one also although i created a separate branch for this issue. I am not sure if this should happen.
Why is this happening?
Ishan Srivastava
@ishanSrt
Jan 16 2018 08:40
@kriti21 look at the details. It says code coverage 100% not reached
Manan Kalra
@manankalra
Jan 16 2018 13:25
Anyone familiar with writing linter bears? Need to clarify something.
newbazz
@newbazz
Jan 16 2018 13:27
Refer the docs ;)
Manan Kalra
@manankalra
Jan 16 2018 13:30
@newbazz Already did that. Need to clarify something from the docs itself. :D
Adhityaa
@adtac
Jan 16 2018 13:32
then ask the question
never ask to ask
Manan Kalra
@manankalra
Jan 16 2018 13:38

The docs mention:

The linter class is only capable of processing one file at a time, for this purpose pylint or the external tool needs to be invoked every time with the appropriate parameters.

This isn't the case with global linter bears, right? As they'll be executed once for all the files present in the current working directory. Therefore, they also won't require any definition of the create_arguments function?

the create_argument can still take the config_file param
Manan Kalra
@manankalra
Jan 16 2018 14:20
@anctartica Yeah, I've read that. I need to know whether these global linter bears will run for all the files in the current dir at once or not?
For example: pylint is a local linter bear and therefore it runs on each file individually. The results of pylint are thus separately handled by the regex. So, in case of a global linter bear which may return a single output for all the files present in the current directory, will the output_regex option of the @linter decorator handle it?
saksham189
@saksham189
Jan 16 2018 14:42
You can still make coala aware of the file an issue was detected in, by using the filename named group in your output_regex if relevant to the wrapped tool.
this is from the link I sent above. It also has code to go along with it @manankalra
Manan Kalra
@manankalra
Jan 16 2018 14:52
thanks :thumbsup: