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
pre-commit and cookiecutter Poetry auto-generated GHA #113
Comments
See |
I would recommend trying a slightly different config:
So that you use the vendored copy of the github-workflows schema. It would mean you don't get the latest schemastore schema at all times (so sometimes the vendored copy is a few commits behind schemastore), but it makes the hook behave more consistently. Changes on schemastore can't break your linting unexpectedly. I'll take a look at the github workflows you're getting out of that project to see if maybe something is wrong with the hook config here, that it shouldn't be targeting those files. Or maybe there's something wrong with the upstream schema from schemastore. All of this when I get some more time to dig into this. |
I filed an issue with cookiecutter-poetry to suggest a change at that end. On this end of things, I think the match rule for github-workflows validation is not correct, and that it's not correct in schemastore either. I'm going to try to remember to do some testing to confirm that, and then I'll see about changing schemastore and the github-workflows hook. |
I've just released v0.17.1 with a fix to the hook config that should make it no longer match on these files. If you're using I also have a related patch open on schemastore ( SchemaStore/schemastore#2344 ) to fix the match rule there, and the cookiecutter-poetry maintainer said he'll take up my suggested change when he's able. So I think this has surfaced a few little fixes and everything is on a good track now. 😄 Let me know if you see problems with v0.17.1! |
Using Cookiecutter Poetry, I get some GHA which use an
uses: ./.github/workflows/setup-poetry-env
include. This is fine on GHA but pre-commit complains that:Is there any way to exclude those files from pre-commit?
My pre-commit configuration is:
The text was updated successfully, but these errors were encountered: