Skip to content

Commit

Permalink
Run ruff pre-commit rule in CI
Browse files Browse the repository at this point in the history
Closes: ray-project#48508
Signed-off-by: Chi-Sheng Liu <[email protected]>
  • Loading branch information
MortalHappiness committed Dec 28, 2024
1 parent ef84628 commit 513e7a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions .buildkite/lint.rayci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ steps:
matrix:
- clang_format
- code_format
- pre_commit
- untested_code_snippet
- banned_words
- doc_readme
Expand Down
8 changes: 8 additions & 0 deletions ci/lint/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ clang_format() {
./ci/lint/check-git-clang-format-output.sh
}

pre_commit() {
# Run pre-commit on all files
# TODO(MortalHappiness): Run all pre-commit checks
# Currently, we only run the ruff format check
pip install -c python/requirements_compiled.txt pre-commit
pre-commit run ruff --all-files
}

code_format() {
pip install -c python/requirements_compiled.txt -r python/requirements/lint-requirements.txt
FORMAT_SH_PRINT_DIFF=1 ./ci/lint/format.sh --all-scripts
Expand Down

0 comments on commit 513e7a1

Please sign in to comment.