snowhouse icon indicating copy to clipboard operation
snowhouse copied to clipboard

Configure default formatter

Open MartinDelille opened this issue 1 year ago • 1 comments

Hi @sbeyer !

I'm now a long time user of bandit and I wondered if there was a way to configure the default formatter without passing it to the arg list ?

Here is my motivation: I have several test project and I sometimes remove the user parameter containing the formatter option so I regularly need to add again the --formatter qt to the project run argument.

Would it be possible to change the default formatter like defining a macro before including <bandit.h> ? This could also be a conan option.

I'll be happy to have your though about it before starting implementing something.

MartinDelille avatar Aug 09 '23 07:08 MartinDelille

I remember I did some work on decoupling formatters etc from the core of bandit, so that people can write their own formatters and register them. I guess that also included setting the default formatter.

I'm going to check later today what happened to that code. It's probably in one of those branches I haven't touched for so long.

sbeyer avatar Aug 09 '23 08:08 sbeyer