datafusion
datafusion copied to clipboard
dev: Add CI doc prettier check to local `rust_lint.sh`
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.shto 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?
nice -- thank you @2010YOUY01 !
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$
Love it -- thank you @2010YOUY01