mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
Merge branch 'ci/ast_grep_rule_soc_reg_h' into 'master'
feat(ci): add rule to prevent inclusion of <stdint.h> in soc *reg.h headers See merge request espressif/esp-idf!46624
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# Refer to https://ast-grep.github.io/guide/rule-config.html for Rule Essentials
|
||||
id: no-stdint-include-in-soc-reg-header
|
||||
message: Don't include <stdint.h> in soc *reg.h headers
|
||||
severity: error # error, warning, info, hint
|
||||
note: Please remove '#include <stdint.h>' from soc *reg.h headers
|
||||
language: C
|
||||
files:
|
||||
- "components/soc/**/*reg.h"
|
||||
rule:
|
||||
kind: preproc_include
|
||||
has:
|
||||
field: path
|
||||
pattern: $N
|
||||
constraints:
|
||||
N:
|
||||
regex: '^["<]stdint\.h[">]' # match "stdint.h" or <stdint.h>
|
||||
fix: ''
|
||||
Reference in New Issue
Block a user