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 25, 2024
1 parent 2469fd2 commit 0eaaadb
Show file tree
Hide file tree
Showing 2 changed files with 10 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
9 changes: 9 additions & 0 deletions ci/lint/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ clang_format() {
./ci/lint/check-git-clang-format-output.sh
}

pre_commit() {
# Run pre-commit on all files
# Currently, we only run the ruff format check
# TODO(MortalHappiness): Run all pre-commit checks
python --version
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 0eaaadb

Please sign in to comment.