mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
fix: Put style lints behind disabled-by-default config
This commit is contained in:
parent
ce3216e0ae
commit
8844640c6f
7 changed files with 66 additions and 20 deletions
|
@ -227,6 +227,7 @@ pub struct DiagnosticsConfig {
|
|||
pub disable_experimental: bool,
|
||||
pub disabled: FxHashSet<String>,
|
||||
pub expr_fill_default: ExprFillDefaultMode,
|
||||
pub style_lints: bool,
|
||||
// FIXME: We may want to include a whole `AssistConfig` here
|
||||
pub insert_use: InsertUseConfig,
|
||||
pub prefer_no_std: bool,
|
||||
|
@ -245,6 +246,7 @@ impl DiagnosticsConfig {
|
|||
disable_experimental: Default::default(),
|
||||
disabled: Default::default(),
|
||||
expr_fill_default: Default::default(),
|
||||
style_lints: true,
|
||||
insert_use: InsertUseConfig {
|
||||
granularity: ImportGranularity::Preserve,
|
||||
enforce_granularity: false,
|
||||
|
@ -324,7 +326,7 @@ pub fn diagnostics(
|
|||
|
||||
let mut diags = Vec::new();
|
||||
if let Some(m) = module {
|
||||
m.diagnostics(db, &mut diags);
|
||||
m.diagnostics(db, &mut diags, config.style_lints);
|
||||
}
|
||||
|
||||
for diag in diags {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue