datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

dev: Add CI doc prettier check to local `rust_lint.sh`

Open 2010YOUY01 opened this issue 1 month ago • 1 comments

Which issue does this PR close?

A small step towards https://github.com/apache/datafusion/issues/19227

Rationale for this change

What changes are included in this PR?

  • Move doc prettier check command to a local script
  • Add this script to the lint-check runner dev/rust_lint.sh to make local development easier (Technically it's neither rust nor lint, but keeping all non functional tests here seem to be the most convenient.)

Are these changes tested?

Are there any user-facing changes?

2010YOUY01 avatar Dec 10 '25 09:12 2010YOUY01

nice -- thank you @2010YOUY01 !

alamb avatar Dec 11 '25 13:12 alamb

I ran it one more time manually

(venv) andrewlamb@Andrews-MacBook-Pro-3:~/Software/datafusion$ ci/scripts/doc_prettier_check.sh
/Users/andrewlamb/Software/datafusion/ci/scripts/doc_prettier_check.sh: Checking documents with prettier
Checking formatting...
[warn] docs/source/library-user-guide/upgrading.md
[warn] Code style issues found in the above file. Forgot to run Prettier?
Prettier check failed. Re-run with --write (e.g., ./ci/scripts/doc_prettier_check.sh --write) to format files, commit the changes, and re-run the check.
(venv) andrewlamb@Andrews-MacBook-Pro-3:~/Software/datafusion$ ci/scripts/doc_prettier_check.sh --write
/Users/andrewlamb/Software/datafusion/ci/scripts/doc_prettier_check.sh: Formatting documents with prettier
...
(venv) andrewlamb@Andrews-MacBook-Pro-3:~/Software/datafusion$ ci/scripts/doc_prettier_check.sh
/Users/andrewlamb/Software/datafusion/ci/scripts/doc_prettier_check.sh: Checking documents with prettier
Checking formatting...
All matched files use Prettier code style!
(venv) andrewlamb@Andrews-MacBook-Pro-3:~/Software/datafusion$

alamb avatar Dec 11 '25 22:12 alamb

Love it -- thank you @2010YOUY01

alamb avatar Dec 11 '25 22:12 alamb