mirror of
https://github.com/espressif/esp-idf.git
synced 2026-08-13 04:42:01 +03:00
feat(ci): add rule to prevent inclusion of <stdint.h> in soc *reg.h headers
This commit is contained in:
17
tools/ci/sg_rules/no_stdint_include_in_soc_reg_header.yml
Normal file
17
tools/ci/sg_rules/no_stdint_include_in_soc_reg_header.yml
Normal file
@@ -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