-
Notifications
You must be signed in to change notification settings - Fork 42
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
Regression in gitlab-ci: coverage regex not recognised #516
Comments
This is a regression, but it's not in the schema! Thanks for the MRE, it made it easy to confirm. In v0.31.0 the default regex behavior became ECMAScript regexes in unicode mode. However, for GitLab specifically that's probably the wrong choice, since GitLab's regexes are in the ruby engine (which we cannot perfectly support). I was able to get your example to work by adding I plan to include a switch to this for the pre-commit hook in the next release, but confirmation that the setting works well would be good. |
Thanks for the quick reply 🙏 I can confirm that your workaround works for me on both the minimal example and on my full GitLab CI configuration 🎉 python -m pip install --quiet 'check-jsonschema==0.31'
check-jsonschema --builtin-schema --regex-variant nonunicode "gitlab-ci" min-gitlab-ci.yml
# ok -- validation done
check-jsonschema --builtin-schema --regex-variant nonunicode "gitlab-ci" .gitlab-ci.yml
# ok -- validation done I'm happy with the workaround and I look forward to the switch in the next release. Feel free to close this ticket whenever you feel is appropriate. Thanks again! |
Context
This follows from #436, about the wrong report 'coverage: [...] is not a regex' with the
gitlab-ci
schema. One solution was to use the following regex (minimal example of.gitlab-ci.yml
file):Problem
The solution from #436 worked until version 0.30.0 of
check-jsonschema
. This can be reproduced with the minimal example above. Assuming it is the content of the filemin-gitlab-ci.yml
:Result:
This now fails with version
0.31
:Result:
Is this a regression? Should the regex be changed?
Thanks in advance for any support on this.
Environment details
OS: Arch Linux
Python: 3.9.21
The text was updated successfully, but these errors were encountered: