Add notes on pre-commit to contributing guide. (#17558)
Progress on https://github.com/iree-org/iree/issues/17430
diff --git a/docs/website/docs/developers/general/contributing.md b/docs/website/docs/developers/general/contributing.md
index eeb86ec..7ab6e9d 100644
--- a/docs/website/docs/developers/general/contributing.md
+++ b/docs/website/docs/developers/general/contributing.md
@@ -169,25 +169,26 @@
Most of the code style is derived from the
[Google Style Guides](http://google.github.io/styleguide/) for the appropriate
-language and is generally not something we accept changes on (as clang-format
-and other linters set that for us). The C++ compiler portion of the project
-follows the
+language. The C++ compiler portion of the project follows the
[MLIR/LLVM style guide](https://mlir.llvm.org/getting_started/DeveloperGuide/#style-guide).
-Improvements to code structure and clarity are welcome but please file issues
-to track such work first. Pure style changes are unlikely to be accepted unless
-they are applied consistently across the project.
+We use [pre-commit](https://pre-commit.com/) to run assorted formatters and lint
+checks. The configuration file at
+[`.pre-commit-config.yaml`](https://github.com/iree-org/iree/blob/main/.pre-commit-config.yaml)
+defines which "hooks" run.
-??? tip - "Tip - code formatters and lint scripts"
+* To run these hooks on your local commits, follow the
+ [pre-commit installation instructions](https://pre-commit.com/#installation).
+* Individual formatters like
+ [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) (C/C++) and
+ [_Black_](https://black.readthedocs.io/en/stable/) (Python) can also be set to
+ run automatically in your editor of choice.
- Formatters like
- [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) (C/C++) and
- [_Black_](https://black.readthedocs.io/en/stable/) (Python) can be set to
- run automatically in your editor of choice.
+!!! note
- The script at
- [`build_tools/scripts/lint.sh`](https://github.com/iree-org/iree/blob/main/build_tools/scripts/lint.sh)
- can also be used to run the full suite of lint checks.
+ Improvements to code structure and clarity are welcome but please file
+ issues to track such work first. Pure style changes are unlikely to be
+ accepted unless they are applied consistently across the project.
### :material-test-tube: Testing policy