Feature: add support for flake8-bugbear#36
Conversation
|
Thank you so much for this work, I really appreciate it! In my mind, I keep ping-ponging between two things, and I am curious about your opinion. On one hand, I think additions like this are fine, code looks good, so we should do it. On the other hand, there are many more plugins to flake8 people might want to use. A curated list of them can be found here: https://github.com/DmytroLitvinov/awesome-flake8-extensions . Recently I made possible that you can install any plugin yourself before executing this action, so you can be in control of what plugins you want. But that might not be for everyone. Additional, bugbear is a bit special, as it is one of the only ones I know of that use their own letter for warning: a So I wonder if we shouldn't be doing the following:
This way we don't only add bugbear support, but also support for any of the other plugins. What do you think? Would you be up for making this change? |
|
Ah yes, in my head that was the default next step in evolving this action. Giving that you replied fast and is Sunday morning i think i can cook something up :)
Yes, i was thinking the same thing.
I just gave the extensions list a quick glance and already found other codes (D for flake8_docstrings, H for cohesion) The solution in my head would be to also make the with:
error_classes: E,F # this would be the default
warning_classes: W,B,Dor with:
errors_pattern: ^([^:]*):(\\d+):(\\d+): ([EF]\\d\\d\\d) (.*)$
warnings_pattern: ^([^:]*):(\\d+):(\\d+): ([W]\\d\\d\\d) (.*)$Maybe at some point in time support both? edited: changed codes_prefixes to classes which is more correct (https://flake8.pycqa.org/en/latest/glossary.html#term-error-class) |
TrueBrain
left a comment
There was a problem hiding this comment.
Looking really good :D I like this solution a lot more, really nice.
Some minor feedback, mostly nitpicking :)
|
Done on my side for now. The final behavior for classes is as following:
Let me know if anything else needs to be changed :) pd: it's my assumption that this PR will be squashed. I can always rebase on my side if necessary |
TrueBrain
left a comment
There was a problem hiding this comment.
I think this is spot on :D Really nice work, tnx a lot! One minor thing, and a nitpick, but otherwise good to go!
And yes, I will squash, no worries :)
| - uses: actions/checkout@v2 | ||
| - uses: ./ | ||
| with: | ||
| plugins: flake8-bugbear |
There was a problem hiding this comment.
I think we should set the path here to example_bugbear. Means there are less repeated warnings, and easier for me to check if a PR breaks anything :)
There was a problem hiding this comment.
ouch, i actually thought of that and then totally forgot. pushing
action/entrypoint.sh
Outdated
|
|
||
| # Enable the matcher. | ||
| ACTION_FOLDER=$(dirname ${0}) | ||
| echo " - error_classes: $INPUT_ERROR_CLASSES" |
There was a problem hiding this comment.
really nitpicking here, sorry: should be ${INPUT_ERROR_CLASSES} :D (similar for the other cases closeby)
|
v2.1 released with this feature. I am really happy with this, this is a very solid addition to the action :D Tnx again! |
|
No problem! thanks for replying fast :) pd: in case you were curious https://github.com/redbeestudios/hexagon |

Hey!, i just had the need to add PyCQA/flake8-bugbear to one of my projects. Figured it would be nice to support it here directly.
Let me know if you find it useful or would like anything changed.