These are chat archives for coala/coala-bears

17th
Nov 2017
Rohit Upadhyay
@urohit011
Nov 17 2017 14:38
corobo assign coala/coala-bears#2130
corobo
@co-robo
Nov 17 2017 14:38
Congratulations! You've been assigned to the issue. :tada:
Sushil khanchi
@khanchi97
Nov 17 2017 14:55
BearTesting
when I run CPPCheck Globalbear on a directory which has some cpp files this is the output.
So now, I want to ask when writing test to check those messages how I can get those messages.I tried self.uut.message_queue.queue[index] to get the messages but, it didn't help for me.
Sushil khanchi
@khanchi97
Nov 17 2017 15:18

One more little query
Following lines are from CPPCheckBear(not Global bear)

@staticmethod
    def create_arguments(filename, file, config_file,
                         enable: typed_list(str)=[]):
        """
        :param enable:
            Choose specific issues to report. Issues that can be
            reported are: all, warning, style, performance,
            portability, information, unusedFunction,
            missingInclude
        """

When I run this Bear on a file it doesn't ask for enable parameter.How I can give this extra parameter to wrapped tool?

Mischa Krüger
@Makman2
Nov 17 2017 15:25
yes because you've given it a default value @khanchi97
Sushil khanchi
@khanchi97
Nov 17 2017 15:26
But if someone is using it a user then what?
Mischa Krüger
@Makman2
Nov 17 2017 15:26
just provide it as a setting inside a coafile or via -S
coala ... -S enable=a,b,c
Sushil khanchi
@khanchi97
Nov 17 2017 15:27
thanks
@Makman2 what do you say about my previous question :point_up: https://gitter.im/coala/coala-bears?at=5a0ef856ba39a53f1ab06592
Mischa Krüger
@Makman2
Nov 17 2017 15:29
grab the results instead of getting the log messages
you can reuse LocalBearTestHelper.check_results for that
Sushil khanchi
@khanchi97
Nov 17 2017 15:30
but it's not a localbear
Mischa Krüger
@Makman2
Nov 17 2017 15:30
copy the function^^
we sadly have no GlobalBearTestHelper yet
or actually
you could just code one and create a new commit just for this check_results function for global bears
the test helper wouldn't do more for now
best is just look into other tests for global bears how they do it
Sushil khanchi
@khanchi97
Nov 17 2017 15:33

you could just code one and create a new commit just for this check_results function for global bears

I'll try to write this function for global bears.

Mischa Krüger
@Makman2
Nov 17 2017 15:33
but please test against Results, not just if results were returned or nothing at all
Sushil khanchi
@khanchi97
Nov 17 2017 15:35

but please test against Results, not just if results were returned or nothing at all

yeah, that's why I was asking that how I can get those message logs, to write a good test.

Mischa Krüger
@Makman2
Nov 17 2017 15:36
yeah that's what I'm saying, don't use the log messages
try to get the Result objects directly
ah DuplicatefileBearTest.py is probably best to look at @khanchi97
Sushil khanchi
@khanchi97
Nov 17 2017 15:37
okay