diff --git a/.buildkite/lint.rayci.yml b/.buildkite/lint.rayci.yml index a8331d5327db..c1a812d98ed8 100644 --- a/.buildkite/lint.rayci.yml +++ b/.buildkite/lint.rayci.yml @@ -9,6 +9,7 @@ steps: matrix: - clang_format - code_format + - pre_commit - untested_code_snippet - banned_words - doc_readme diff --git a/ci/lint/lint.sh b/ci/lint/lint.sh index 3df26e6a2447..3aed69d33225 100755 --- a/ci/lint/lint.sh +++ b/ci/lint/lint.sh @@ -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