format-code: handle incorrect 'env python3'
I noticed the `tools/owners` file was not getting the linters ran
correctly and upon investigation I found that it had the wrong path
for env, which caused `file` to give incorrect results.
Fix the path in tools/owners, reformat and fix linter issues, and
ensure the scripts can handle python3 scripts with the wrong env
path.
I checked the codebase and there was only one other script, which
happens to reside in openbmc/openbmc, which used this incorrect
path. Therefore this change should have no effect on existing
repositories.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ice9703afbf104e3529f2c1b29ba8ba680eb07d94
diff --git a/scripts/format-code.sh b/scripts/format-code.sh
index 2eab096..fefbae3 100755
--- a/scripts/format-code.sh
+++ b/scripts/format-code.sh
@@ -208,6 +208,7 @@
*JSON\ data*) echo "json" && return ;;
*POSIX\ shell*) echo "sh" && return ;;
*Python\ script*) echo "python" && return ;;
+ *python3\ script*) echo "python" && return ;;
*zsh\ shell*) echo "zsh" && return ;;
esac