-
Notifications
You must be signed in to change notification settings - Fork 5
Add linting and formatting #28
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
Conversation
m-aciek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, it looks like comprehensive set of linters!
We could also add this repo to https://pre-commit.ci/ so it will autofix PRs?
I think it's a good idea 👍
| - repo: https://github.com/python-jsonschema/check-jsonschema | ||
| rev: 0.30.0 | ||
| hooks: | ||
| - id: check-github-workflows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it superfluous? (Unless I'm missing something.) We don't store JSON schemas AFAIC nor have it in a near perspective.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can help with the files in .github/workflows/. For example, if we'd accidentally put runs-on: ubuntu it would say:
.github/workflows/update.yml:11:14: label "ubuntu" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file [runner-label]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, yaml is a superset of json, so it makes sense; though doesn't https://github.com/rhysd/actionlint cover also the workflow files schema validation?
Please could you add it, if you've not already? |
|
I've installed the Pre-commit CI in the repo today. |
And run on GitHub Actions via pre-commit.
We could also add this repo to https://pre-commit.ci/ so it will autofix PRs?
📚 Documentation preview 📚: https://pydocs-translation-dashboard--28.org.readthedocs.build/