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

This commit is contained in:
morris
2025-09-16 21:23:47 +08:00
parent c0667e61fd
commit 72979fb6c2
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
files:
- "components/hal/**/*"
- "components/esp_hal*/**/*"
ignores:
# porting layer and test apps are allowed to use Kconfig macros
- "components/hal/platform_port/**/*"
- "components/hal/test_apps/**/*"
- "components/esp_hal*/test_apps/**/*"
# the following files should be refactored to remove Kconfig macros
- "components/hal/adc_oneshot_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
files:
- "components/hal/**/*"
- "components/esp_hal*/**/*"
ignores:
# porting layer and test apps are allowed to include sdkconfig.h
- "components/hal/platform_port/**/*"
- "components/hal/test_apps/**/*"
- "components/esp_hal*/test_apps/**/*"
# the following files should be refactored to remove sdkconfig.h
- "components/hal/adc_oneshot_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
files:
- "components/hal/**/*"
- "components/esp_hal*/**/*"
ignores:
- "components/hal/test_apps/**/*"
- "components/esp_hal*/test_apps/**/*"
rule:
kind: expression_statement
pattern: assert($$$ARGS);
@@ -22,8 +24,10 @@ note: Please use hal/assert.h to replace assert.h
language: C
files:
- "components/hal/**/*"
- "components/esp_hal*/**/*"
ignores:
- "components/hal/test_apps/**/*"
- "components/esp_hal*/test_apps/**/*"
rule:
kind: preproc_include
has: