actions-flake8 icon indicating copy to clipboard operation
actions-flake8 copied to clipboard

Seems to not filter on flake8-simplify class errors

Open eivindjahren opened this issue 3 years ago • 2 comments

When using

      - name: flake8 Lint
        uses: TrueBrain/actions-flake8@v2
        with:
          plugins: flake8-simplify
          error_classes: 'E,F'
          warning_classes:'SIM'

I would expect SIM errors to become a warning, but it becomes a failing error

eivindjahren avatar Jul 23 '22 14:07 eivindjahren

This action currently only supports error/warnings classes of a single letter. As that was what everyone was doing ... but of course it was waiting for someone to come along and break that rule :P And simplify is that one :)

Fixing this is non-trivial, as currently we do some magic to make the matching work .. I will put it on my todo list to look into it!

TrueBrain avatar Jul 23 '22 15:07 TrueBrain

From a quick look, it seems it's currently a character group that gets substituted into the regex.

I think if you just used a non-capturing group it should work: https://www.regular-expressions.info/brackets.html

So e.g.: E,F,SIM Gets translated to: (?:E|F|SIM)

Assuming they're supported...

peternewman avatar Feb 16 '23 09:02 peternewman