The return value of style_check was reversed returning true for "no errors" while the script checks for true meaning "error found".
Adjust that by direct
Also replace use of backticks by
$(...) as suggested by shellCheck.
Also refactor the pre-commit script where especially the docker command was so long it was hard to see what is being done, so put that into functions. Also add some output to see where things went wrong (the faulty code-style script was hard to find)