[docs] Ray security precommit fix#59591
Conversation
## Context PR ray-project#57799 removed ci/lint/format.sh and the `code_format` job from the microcheck pipeline in favor of pre-commit-only checks. However, this created a gap in coverage: .pre-commit-config.yaml globally excludes doc/source/, meaning Python/shell files in documentation are no longer formatted or linted. ## Problem Many Anyscale console templates use content from doc/source/, including .py, .sh, and .yaml files that users reference. These files should follow the same formatting standards as the rest of the Ray repo. The old format.sh checked doc/source/ with: - black (Python formatting) - shellcheck (shell script linting) - docstyle (Ray docstring style) - check-import-order (import ordering) ## Solution Updated .pre-commit-config.yaml to restore formatting checks on doc/source/: 1. Changed global exclude from "doc/source/" to only exclude notebooks 2. Added "exclude: ^doc/source/" to 14 hooks that weren't in format.sh 3. Kept black, shellcheck, docstyle, and check-import-order enabled Also marked the dead code_format() function in ci/lint/lint.sh for removal. ## Files Changed - .pre-commit-config.yaml: Restore formatting checks for doc/source/ - ci/lint/lint.sh: Mark dead code_format() function for removal Signed-off-by: Aydin Abiar <aydin@anyscale.com>
Signed-off-by: Aydin Abiar <aydin@anyscale.com>
Signed-off-by: Aydin Abiar <aydin@anyscale.com>
There was a problem hiding this comment.
Code Review
This pull request focuses on improving the documentation linting process by enabling vale for the doc/source directory and updating the pre-commit configuration accordingly. The changes include excluding doc/source from various hooks to avoid conflicts, updating vale's vocabulary and rules, and fixing existing lint errors in the security documentation. Overall, the changes are a positive step towards better documentation quality. I've made a few suggestions for minor improvements.
|
This pull request has been automatically marked as stale because it has not had You can always ask for help on our discussion forum or Ray's public slack channel. If you'd like to keep this open, just leave any comment, and the stale label will be removed. |
|
This pull request has been automatically closed because there has been no more activity in the 14 days Please feel free to reopen or open a new pull request if you'd still like this to be addressed. Again, you can always ask for help on our discussion forum or Ray's public slack channel. Thanks again for your contribution! |
doc/source has been excluded from pre-commit, fixing current format/lint errors before including it back.