Skip to content

[docs] Ray security precommit fix#59591

Closed
Aydin-ab wants to merge 8 commits intoray-project:masterfrom
Aydin-ab:ray-security-precommit-fix
Closed

[docs] Ray security precommit fix#59591
Aydin-ab wants to merge 8 commits intoray-project:masterfrom
Aydin-ab:ray-security-precommit-fix

Conversation

@Aydin-ab
Copy link
Copy Markdown
Contributor

doc/source has been excluded from pre-commit, fixing current format/lint errors before including it back.

## 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>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 7, 2026

This pull request has been automatically marked as stale because it has not had
any activity for 14 days. It will be closed in another 14 days if no further activity occurs.
Thank you for your contributions.

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.

@github-actions github-actions bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Jan 7, 2026
@github-actions
Copy link
Copy Markdown

This pull request has been automatically closed because there has been no more activity in the 14 days
since being marked stale.

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!

@github-actions github-actions bot closed this Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale The issue is stale. It will be closed within 7 days unless there are further conversation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant