fix(format): check more source code (#3493)
and sync .pre-commit-config.yaml with scripts/code-format.py Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
@@ -19,12 +19,9 @@ repos:
|
||||
verbose: true
|
||||
files: |
|
||||
(?x)^(
|
||||
demos/ |
|
||||
examples/ |
|
||||
src/ |
|
||||
tests/src/test_cases/
|
||||
)
|
||||
exclude: |
|
||||
(?x)^(
|
||||
src/extra/libs/ |
|
||||
src/lv_conf_internal.h
|
||||
tests/
|
||||
)
|
||||
types_or: ["c", "header"]
|
||||
@@ -25,6 +25,7 @@
|
||||
--ignore-exclude-errors
|
||||
--ignore-exclude-errors-x
|
||||
--exclude=assets
|
||||
--exclude=test_fonts
|
||||
--exclude=../src/core/lv_obj_style_gen.c
|
||||
--exclude=../src/core/lv_obj_style_gen.h
|
||||
--exclude=../src/extra/libs/gif/gifdec.c
|
||||
@@ -36,6 +37,7 @@
|
||||
--exclude=../src/extra/libs/sjpg/tjpgd.c
|
||||
--exclude=../src/extra/libs/sjpg/tjpgd.h
|
||||
--exclude=../src/extra/libs/sjpg/tjpgdcnf.h
|
||||
--exclude=../src/misc/lv_style_gen.c
|
||||
--exclude=../src/misc/lv_style_gen.h
|
||||
--exclude=../tests/src/test_cases/_test_template.c
|
||||
--exclude=../tests/unity/unity.c
|
||||
--exclude=../tests/unity/unity_internals.h
|
||||
--exclude=../tests/unity/unity_support.c
|
||||
--exclude=../tests/unity/unity_support.h
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
import os
|
||||
|
||||
print("Formatting src")
|
||||
os.system('astyle --options=code-format.cfg --recursive "../src/*.c,*.h"')
|
||||
|
||||
print("\nFormatting demos")
|
||||
os.system('astyle --options=code-format.cfg --recursive "../demos/*.c,*.h"')
|
||||
|
||||
print("\nFormatting examples")
|
||||
os.system('astyle --options=code-format.cfg --recursive "../examples/*.c,*.h"')
|
||||
|
||||
print("Formatting src")
|
||||
os.system('astyle --options=code-format.cfg --recursive "../src/*.c,*.h"')
|
||||
|
||||
print("\nFormatting tests")
|
||||
os.system('astyle --options=code-format.cfg --recursive "../tests/src/test_cases/*.c"')
|
||||
os.system('astyle --options=code-format.cfg --recursive "../tests/*.c,*.h"')
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#include <stdio.h>
|
||||
#include "lvgl/lvgl.h"
|
||||
|
||||
int main(void) {
|
||||
int main(void)
|
||||
{
|
||||
lv_init();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user