Hello Simon and other interested parties,

On Sat, 28 Nov 2020 12:28:16 +0100 Simon Ruderich <si...@ruderich.org>
wrote:
>
> is the problem because blhc requires a space after each flag. I
> know this handling is not perfect but parsing arbitrary shell
> commands is difficult.

I have run into this exact issue with bazel-bootstrap builds. [1] I love
what blhc does so I'd rather not disable it due to these false positives,
but I also like for the Salsa CI to let me know when a recent commit has
caused a problem, and constant test failures mask that.

Would it be possible to change the regex so that it will also accept a " or
a ' next to the spaces surrounding the flag? That way all of the three
following would be considered valid:
    -D_FORTIFY_SOURCE=2
    '-D_FORTIFY_SOURCE=2'
    "-D_FORTIFY_SOURCE=2"

If you think it could cause problems to implement that as default behavior,
is it something that could be implemented as an option? Something along
the lines of `blhc --accept-quoted` perhaps?

Thanks for your work on this package, it's a very useful indicator of
regressions or other coding issues!


-Olek

[1] https://salsa.debian.org/bazel-team/bazel-bootstrap/-/jobs/1452282

Reply via email to