Merge branch 'feat/ast_grep_scan_more_hal_components' into 'master'

fix(ci): update ast-grep rules to include esp_hal components

See merge request espressif/esp-idf!41954
This commit is contained in:
morris
2025-09-17 12:33:33 +08:00
2 changed files with 8 additions and 0 deletions

View File

@@ -6,10 +6,12 @@ note: hal component should be able to deliver without 3rd party config system
language: C language: C
files: files:
- "components/hal/**/*" - "components/hal/**/*"
- "components/esp_hal*/**/*"
ignores: ignores:
# porting layer and test apps are allowed to use Kconfig macros # porting layer and test apps are allowed to use Kconfig macros
- "components/hal/platform_port/**/*" - "components/hal/platform_port/**/*"
- "components/hal/test_apps/**/*" - "components/hal/test_apps/**/*"
- "components/esp_hal*/test_apps/**/*"
# the following files should be refactored to remove Kconfig macros # the following files should be refactored to remove Kconfig macros
- "components/hal/adc_oneshot_hal.c" - "components/hal/adc_oneshot_hal.c"
- "components/hal/cache_hal.c" - "components/hal/cache_hal.c"
@@ -43,10 +45,12 @@ note: hal component should be able to deliver without 3rd party config system
language: C language: C
files: files:
- "components/hal/**/*" - "components/hal/**/*"
- "components/esp_hal*/**/*"
ignores: ignores:
# porting layer and test apps are allowed to include sdkconfig.h # porting layer and test apps are allowed to include sdkconfig.h
- "components/hal/platform_port/**/*" - "components/hal/platform_port/**/*"
- "components/hal/test_apps/**/*" - "components/hal/test_apps/**/*"
- "components/esp_hal*/test_apps/**/*"
# the following files should be refactored to remove sdkconfig.h # the following files should be refactored to remove sdkconfig.h
- "components/hal/adc_oneshot_hal.c" - "components/hal/adc_oneshot_hal.c"
- "components/hal/cache_hal.c" - "components/hal/cache_hal.c"

View File

@@ -6,8 +6,10 @@ note: The standard assert function depends on esp_libc(G1) component, but hal is
language: C language: C
files: files:
- "components/hal/**/*" - "components/hal/**/*"
- "components/esp_hal*/**/*"
ignores: ignores:
- "components/hal/test_apps/**/*" - "components/hal/test_apps/**/*"
- "components/esp_hal*/test_apps/**/*"
rule: rule:
kind: expression_statement kind: expression_statement
pattern: assert($$$ARGS); pattern: assert($$$ARGS);
@@ -22,8 +24,10 @@ note: Please use hal/assert.h to replace assert.h
language: C language: C
files: files:
- "components/hal/**/*" - "components/hal/**/*"
- "components/esp_hal*/**/*"
ignores: ignores:
- "components/hal/test_apps/**/*" - "components/hal/test_apps/**/*"
- "components/esp_hal*/test_apps/**/*"
rule: rule:
kind: preproc_include kind: preproc_include
has: has: