Dear 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.
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.
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.
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/[email protected]
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?
@chamaoskurumi thanks a lot for your question! I would say that currently it is not possible. Because flakehell is an external tool. It is kinda supported, but it is not FULLY supported.
Currently, I am working on a baseline that is going to be native for wemake-python-styleguide.
Please, take a look at:
Best,
Nikita
Thanks for your quick reply @sobolevn !
Looking at the two issues, it seems like the native baseline feature might be ready in the not too distant future. That's great!
So I'll just wait for the release and come back here if I encounter any problems with that baseline feature.
I hope to get this done by the end of this week. 馃憤
Closing this for now. Stay tuned for new upcoming releases!
Hey @sobolevn, any chance the --baseline feature gets a review and makes it into a release anytime soon? :pray:
Most helpful comment
I hope to get this done by the end of this week. 馃憤