Merge pull request #9234 from davidhorstmann-arm/make-code-style-work-in-commit-hook-3.6

[Backport 3.6] Allow `code_style.py` to work from a git hook