reviewdog / action-flake8

Runs flake8 with Reviewdog :dog:
https://github.com/reviewdog/reviewdog
MIT License
17 stars 7 forks source link

ValueError: Error code '#' supplied to 'ignore' option does not match '^[A-Z]{1,3}[0-9]{0,3}$' #40

Closed miohtama closed 1 year ago

miohtama commented 1 year ago

Getting this on Github actions. This was working before and "nothing has changed".

 Installing collected packages: pyflakes, pycodestyle, mccabe, flake8
Successfully installed flake8-6.0.0 mccabe-0.7.0 pycodestyle-2.10.0 pyflakes-3.0.1
[action-flake8] Flake8 version:
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.15/x64/bin/flake8", line 8, in <module>
    sys.exit(main())
  File "/opt/hostedtoolcache/Python/3.9.15/x64/lib/python3.9/site-packages/flake8/main/cli.py", line 23, in main
    app.run(argv)
  File "/opt/hostedtoolcache/Python/3.9.15/x64/lib/python3.9/site-packages/flake8/main/application.py", line 198, in run
    self._run(argv)
  File "/opt/hostedtoolcache/Python/3.9.15/x64/lib/python3.9/site-packages/flake8/main/application.py", line 186, in _run
    self.initialize(argv)
  File "/opt/hostedtoolcache/Python/3.9.15/x64/lib/python3.9/site-packages/flake8/main/application.py", line 165, in initialize
    self.plugins, self.options = parse_args(argv)
  File "/opt/hostedtoolcache/Python/3.9.15/x64/lib/python3.9/site-packages/flake8/options/parse_args.py", line 53, in parse_args
    opts = aggregator.aggregate_options(option_manager, cfg, cfg_dir, rest)
  File "/opt/hostedtoolcache/Python/3.9.15/x64/lib/python3.9/site-packages/flake8/options/aggregator.py", line 30, in aggregate_options
    parsed_config = config.parse_config(manager, cfg, cfg_dir)
  File "/opt/hostedtoolcache/Python/3.9.15/x64/lib/python3.9/site-packages/flake8/options/config.py", line 131, in parse_config
    raise ValueError(
ValueError: Error code '#' supplied to 'ignore' option does not match '^[A-Z]{1,3}[0-9]{0,3}$'
Error: Process completed with exit code 1.

There is no flake8 config entered, but it is the default settings of the actions. I would assume it is some sort of version incompatibility.

rickstaa commented 1 year ago

Hey @miohtama, my apologies for the delayed response—I was tangled up in some OS duties! 😅 I noticed your error displaying the Flake8 version: but not the echo "[action-flake8] Checking python code with the flake8 linter and reviewdog..." log statement. It seems the hiccup might be in this piece of code:

https://github.com/reviewdog/action-flake8/blob/51c2708ac3e9463b4d27d0ba7d9e3ded608a6ad3/entrypoint.sh#L20C1-L20C17

Given that our action lacks a default config file, I suspect a flake8 bug in your version. Closing this issue for now since I can not reproduce it (see https://github.com/rickstaa/action-test-repo/actions/runs/6523135680/job/17713467681). If these problems persist, don't hesitate to comment below so I can re-open this issue.