feat: 打开clippy的stack overflow静态检查

*限制栈大小最大为4096字节
*限制栈中的数组最大为1024字节
This commit is contained in:
YJwu2023 2025-03-31 23:23:19 +08:00 committed by scutKKsix
parent 6242ecb2bd
commit 2a867f467e
2 changed files with 5 additions and 1 deletions

View File

@ -1,2 +1,4 @@
# 这是clippy的配置文件详情请见
# https://doc.rust-lang.org/clippy/lint_configuration.html
stack-size-threshold = 4096
array-size-threshold = 1024

View File

@ -26,6 +26,8 @@
#![allow(static_mut_refs, non_local_definitions, internal_features)]
// clippy的配置
#![deny(clippy::all)]
#![deny(clippy::large_stack_frames)]
#![deny(clippy::large_const_arrays)]
// DragonOS允许在函数中使用return语句尤其是长函数时我们推荐这么做
#![allow(
clippy::macro_metavars_in_unsafe,