diff --git a/dev/setup/pre-commit/README.md b/dev/setup/pre-commit/README.md index 71318703b91..72e877d9a81 100644 --- a/dev/setup/pre-commit/README.md +++ b/dev/setup/pre-commit/README.md @@ -44,8 +44,22 @@ the project: `pre-commit-config.yaml`. The good file redirects output to the error channel so your IDE will be able to catch the error. +### Troubleshooting + +# If you get error "ModuleNotFoundError: No module named 'platformdirs'" + +Install the python package with +`pip3 install platformdirs` or `pip3 install platformdirs --break-system-packages` + +# if yoy get error "ERROR: PHP_CodeSniffer requires the tokenizer, xmlwriter and SimpleXML extensions to be enabled. Please enable xmlwriter and SimpleXML." + +Install the PHP package xml +`sudo apt install php-simplexml` + + ### Tips + After installing `pre-commit` onto your local git clone, pre-commit will run on every commit. The first time, all tools required by pre-commit will be installed into ~/.cache/pre-commit