aboutsummaryrefslogtreecommitdiff
path: root/scripts/code-format.py
diff options
context:
space:
mode:
authorCarlos Diaz <carlos.santiago.diaz@gmail.com>2022-02-24 11:44:39 -0600
committerGitHub <noreply@github.com>2022-02-24 18:44:39 +0100
commita83cae012d0fa15b9ef5c7cbdfb5a185a8fbd864 (patch)
tree89e6ee75389d7aa20faa4b47b14ecd9d0b12a5c9 /scripts/code-format.py
parent4ed0f011f6397c47c4bd9a2330e9d7bca06fd1ba (diff)
downloadlvgl-a83cae012d0fa15b9ef5c7cbdfb5a185a8fbd864.tar.gz
lvgl-a83cae012d0fa15b9ef5c7cbdfb5a185a8fbd864.zip
feat(script): add pre-commit configuration for code formatting (#3092)
* Add initial pre-commit configuration for code formatting * chore: Move --recursive switch from cfg file to script * pre-commit: Update format-source hook to use code-format.cfg Also remove the code-format-per-file.cfg file as it's now unused * docs: Add section about pre-commit
Diffstat (limited to 'scripts/code-format.py')
-rwxr-xr-xscripts/code-format.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/code-format.py b/scripts/code-format.py
index fef9eb66a..42faee6ee 100755
--- a/scripts/code-format.py
+++ b/scripts/code-format.py
@@ -2,7 +2,7 @@
import os
-os.system('astyle --options=code-format.cfg "../src/*.c,*.h"')
-os.system('astyle --options=code-format.cfg "../demos/*.c,*.h"')
-os.system('astyle --options=code-format.cfg "../examples/*.c,*.h"')
-os.system('astyle --options=code-format.cfg "../tests/src/test_cases/*.c"')
+os.system('astyle --options=code-format.cfg --recursive "../src/*.c,*.h"')
+os.system('astyle --options=code-format.cfg --recursive "../demos/*.c,*.h"')
+os.system('astyle --options=code-format.cfg --recursive "../examples/*.c,*.h"')
+os.system('astyle --options=code-format.cfg --recursive "../tests/src/test_cases/*.c"')