Skip to content

Commit 90667f3

Browse files
authored
style: group and format individual linters and generators cleanly in linting/lint_group/mod.rs (#3802)
1 parent 110558d commit 90667f3

1 file changed

Lines changed: 19 additions & 17 deletions

File tree

  • harper-core/src/linting/lint_group

harper-core/src/linting/lint_group/mod.rs

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
mod flat_config;
22
mod structured_config;
33

4-
use std::collections::BTreeMap;
5-
use std::hash::BuildHasher;
6-
use std::num::NonZero;
7-
use std::sync::Arc;
4+
use std::{collections::BTreeMap, hash::BuildHasher, num::NonZero, sync::Arc};
85

9-
use foldhash::quality::RandomState;
10-
use hashbrown::HashMap;
11-
use lru::LruCache;
6+
use {foldhash::quality::RandomState, hashbrown::HashMap, lru::LruCache};
127

8+
// Individual Linters
139
use super::a_part::APart;
1410
use super::a_some_time::ASomeTime;
1511
use super::a_ways_to_go::AWaysToGo;
@@ -88,7 +84,6 @@ use super::except_of::ExceptOf;
8884
use super::expand_memory_shorthands::ExpandMemoryShorthands;
8985
use super::expand_people::ExpandPeople;
9086
use super::expand_time_shorthands::ExpandTimeShorthands;
91-
use super::expr_linter::run_on_chunk;
9287
use super::fall_below::FallBelow;
9388
use super::far_be_it::FarBeIt;
9489
use super::fascinated_by::FascinatedBy;
@@ -214,7 +209,6 @@ use super::pronoun_contraction::PronounContraction;
214209
use super::pronoun_inflection_be::PronounInflectionBe;
215210
use super::pronoun_knew::PronounKnew;
216211
use super::pronoun_verb_agreement::PronounVerbAgreement;
217-
use super::proper_noun_capitalization_linters;
218212
use super::quantifier_needs_of::QuantifierNeedsOf;
219213
use super::quantifier_numeral_conflict::QuantifierNumeralConflict;
220214
use super::quite_quiet::QuiteQuiet;
@@ -307,15 +301,23 @@ use super::worth_to_do::WorthToDo;
307301
use super::would_never_have::WouldNeverHave;
308302
use super::wrong_apostrophe::WrongApostrophe;
309303

310-
use super::{ExprLinter, Lint};
311-
use super::{HtmlDescriptionLinter, Linter};
312-
use crate::linting::dashes::Dashes;
313-
use crate::linting::expr_linter::{Chunk, Sentence};
314-
use crate::linting::{
315-
be_adjective_confusions, closed_compounds, initialisms, phrase_set_corrections, weir_rules,
304+
// Modules that create multiple linters each
305+
use super::be_adjective_confusions;
306+
use super::closed_compounds;
307+
use super::initialisms;
308+
use super::phrase_set_corrections;
309+
use super::proper_noun_capitalization_linters;
310+
use super::weir_rules;
311+
312+
use crate::{
313+
linting::{
314+
dashes::Dashes,
315+
expr_linter::{Chunk, Sentence, run_on_chunk},
316+
{ExprLinter, HtmlDescriptionLinter, Lint, Linter},
317+
},
318+
spell::Dictionary,
319+
{Dialect, Document, Lrc, TokenStringExt},
316320
};
317-
use crate::spell::Dictionary;
318-
use crate::{Dialect, Document, Lrc, TokenStringExt};
319321

320322
pub use flat_config::FlatConfig;
321323
pub use structured_config::{

0 commit comments

Comments
 (0)