Setting up a wemake-python-styleguide GitHub action that respects a legacy code flakehell baseline
See original GitHub issueDear wemake-python-styleguide team,
first of all, thanks for the greatest of all python linters! m(__)m
This is not Bug Report, but I have a wemake-python-styleguide specific question, that seems to require an answer by the people who actually know best about the wemake-python-styleguide - and that is obviously you.
So forgive me for misusing the Bug Report to pose my question here.
I posted the very same question on StackOverflow, but it feels like it doesn’tt reach the right audience there to get a proper answer.
Problem
I want to to set up a GitHub Action that runs the wemake-python-styleguide
on every push to the repo, but respects a legacy code flakehell
baseline.
According to the wemake-python-styleguide Website, “flakehell is officially supported by wemake-python-styleguide and developed by the same people”.
My problem is: All the GitHub Action workflow file (.yml
) specifications I’ve tried so far, did not work.
Setup
First, I set a flakehellbaseline
locally via flakehell > .flakehellbaseline
and put the
[tool.flakehell]
baseline = ".flakehell_baseline"
in my pyproject.toml
. Pushed everything to the repo.
Github action workflow specification
1.) Attempt
Then I created a new GitHub Action workflow file (wemakepython.yml
) according to their premade Github Action.
name: wemakepython
on: push
jobs:
wemake:
runs-on: ubuntu-18.04
steps:
- name: wemake-python-styleguide
uses: wemake-services/wemake-python-styleguide@0.14.0
Result:
The action gets triggered, and runs through smoothly. But, it does not report any flake8
or flakehell lint
violations, despite there being plenty of them. How do I know that? If I run either flakehell lint
or flake8 .
locally, there are plenty of violations.
2.) Attempt
If the wemake-python-styleguide
premade GitHub Action does not work, I’ll just specify a flakehell.yml
GitHub Action by myself.
name: flakehell
on: push
jobs:
build:
runs-on: ubuntu-18.04
steps:
- name: flakehell-linter
run: |
pip install flakehell
flakehell lint
Result:
Unfortunately this one doesn’t work either. The action does not even run, it exits with error code 1.
@github-actions
github-actions
/ build
.github#L1
Process completed with exit code 1.
Any ideas how to solve this? May it be a problem with the setup.cfg
and pyproject.toml
definitions?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
I hope to get this done by the end of this week. 👍
Hey @sobolevn, any chance the
--baseline
feature gets a review and makes it into a release anytime soon? 🙏