Repository navigation
Pre-commit: add ruff and enforce all hooks in CI - #343
Open
abhirajadhikary06 wants to merge 1 commit into
Open
abhirajadhikary06 wants to merge 1 commit into
abhirajadhikary06 wants to merge 1 commit into
Conversation
Config only (commit 1 of ArcadeData#270): add ruff (default rules E4/E7/E9/F, line length 88), the hygiene/prettier/shellcheck/hadolint hooks, the CI job that runs uvx pre-commit run --all-files, and the install instructions in CONTRIBUTING.md. The 63 ruff fixes and the first prettier reformat land in separate commits after release/26.11.1 merges to main.
Author
|
@tae898 — opening this as a draft per your timing request. This is commit 1 only: configuration that touches no source file, so it shouldn't conflict with the open
A couple of notes on choices, happy to change any:
As expected on the draft, the Commits 2 (ruff fixes) and 3 (prettier reformat) will be added after |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Enforces pre-commit in CI and adds ruff as the Python linter (#270). This is commit 1 of three — configuration only, touching no source file, so it does not conflict with the open
26.11.1.post1PRs.pyproject.toml:[tool.ruff]with default rules E4/E7/E9/F at line length 88 (Black's default; E501 is intentionally not enabled, so the lines Black leaves long are not flagged)..pre-commit-config.yaml: addsruff-check(check only), the basic hygiene hooks (trailing whitespace, end-of-file, merge-conflict markers, large files, private keys, check-yaml/toml/json/xml), prettier (Java, XML, Markdown, JSON; printWidth 160 for Java/XML, prose not hard-wrapped), shellcheck, and hadolint. Keeps black, isort, shfmt, pretty-format-yaml, actionlint..prettierrc.json: printWidth 160 for*.java/*.xml,proseWrap: preserve..github/workflows/pre-commit.yml: a CI job runninguvx pre-commit run --all-fileson every pull request and push tomain.CONTRIBUTING.md: documentsuvx pre-commit installand the Docker note for shellcheck/hadolint.Related issues
Closes #270 .
Performance changes
None — configuration only.
Docs
CONTRIBUTING.md(the Pre-commit section). NoREADME.mdordocs/change needed for config.Checklist
uvx pre-commit run --files <changed files>passes (run withSKIP=prettier,shellcheck,hadolint-docker,no-old-package-name: the prettier reformat is commit 3, the docker/python3 hooks are Linux-CI only).