Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seems to not filter on flake8-simplify class errors #45

Open
eivindjahren opened this issue Jul 23, 2022 · 2 comments
Open

Seems to not filter on flake8-simplify class errors #45

eivindjahren opened this issue Jul 23, 2022 · 2 comments

Comments

@eivindjahren
Copy link

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

@TrueBrain
Copy link
Owner

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!

@peternewman
Copy link
Contributor

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants