Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
refactor: most `pub use` lines in `mod.rs` not needed (#2259)
Andrew Dunbar0889bf0c822e
diff --git a/harper-core/src/linting/after_later.rs b/harper-core/src/linting/after_later.rsindex 20588bceb..f6a1ea267 100644--- a/harper-core/src/linting/after_later.rs+++ b/harper-core/src/linting/after_later.rs@@ -73,7 +73,8 @@ impl ExprLinter for AfterLater {#[cfg(test)]mod tests {- use crate::linting::{AfterLater, tests::assert_top3_suggestion_result};+ use super::AfterLater;+ use crate::linting::tests::assert_top3_suggestion_result;#[test]fn after_90_days_later() {diff --git a/harper-core/src/linting/allow_to.rs b/harper-core/src/linting/allow_to.rsindex 5b18c9353..034c593c9 100644--- a/harper-core/src/linting/allow_to.rs+++ b/harper-core/src/linting/allow_to.rs@@ -56,10 +56,8 @@ impl ExprLinter for AllowTo {#[cfg(test)]mod tests {- use crate::linting::{- AllowTo,- tests::{assert_lint_count, assert_no_lints},- };+ use super::AllowTo;+ use crate::linting::tests::{assert_lint_count, assert_no_lints};#[test]fn flag_allow_to() {diff --git a/harper-core/src/linting/and_in.rs b/harper-core/src/linting/and_in.rsindex 90bfb8111..09f2ff2a8 100644--- a/harper-core/src/linting/and_in.rs+++ b/harper-core/src/linting/and_in.rs@@ -46,10 +46,8 @@ impl ExprLinter for AndIn {#[cfg(test)]mod tests {- use crate::linting::{- AndIn,- tests::{assert_no_lints, assert_suggestion_result},- };+ use super::AndIn;+ use crate::linting::tests::{assert_no_lints, assert_suggestion_result};#[test]fn dont_flag_an_in_house() {diff --git a/harper-core/src/linting/cautionary_tale.rs b/harper-core/src/linting/cautionary_tale.rsindex db5da883c..0b1d8458c 100644--- a/harper-core/src/linting/cautionary_tale.rs+++ b/harper-core/src/linting/cautionary_tale.rs@@ -57,10 +57,8 @@ impl ExprLinter for CautionaryTale {#[cfg(test)]mod tests {- use crate::linting::{- CautionaryTale,- tests::{assert_lint_count, assert_suggestion_result},- };+ use super::CautionaryTale;+ use crate::linting::tests::{assert_lint_count, assert_suggestion_result};#[test]fn catches_cautionary_tail() {diff --git a/harper-core/src/linting/change_tack.rs b/harper-core/src/linting/change_tack.rsindex 007836ea8..91d661b5a 100644--- a/harper-core/src/linting/change_tack.rs+++ b/harper-core/src/linting/change_tack.rs@@ -64,7 +64,8 @@ impl ExprLinter for ChangeTack {#[cfg(test)]mod tests {- use crate::linting::{ChangeTack, tests::assert_suggestion_result};+ use super::ChangeTack;+ use crate::linting::tests::assert_suggestion_result;// Verbs: change tackdiff --git a/harper-core/src/linting/far_be_it.rs b/harper-core/src/linting/far_be_it.rsindex e41060222..b7346994f 100644--- a/harper-core/src/linting/far_be_it.rs+++ b/harper-core/src/linting/far_be_it.rs@@ -65,9 +65,9 @@ impl ExprLinter for FarBeIt {#[cfg(test)]mod tests {- use crate::linting::{- FarBeIt,- tests::{assert_no_lints, assert_suggestion_count, assert_suggestion_result},+ use super::FarBeIt;+ use crate::linting::tests::{+ assert_no_lints, assert_suggestion_count, assert_suggestion_result,};#[test]diff --git a/harper-core/src/linting/go_so_far_as_to.rs b/harper-core/src/linting/go_so_far_as_to.rsindex 661a39662..3cbf8d5b5 100644--- a/harper-core/src/linting/go_so_far_as_to.rs+++ b/harper-core/src/linting/go_so_far_as_to.rs@@ -77,10 +77,8 @@ impl ExprLinter for GoSoFarAsTo {#[cfg(test)]mod tests {- use crate::linting::{- GoSoFarAsTo,- tests::{assert_no_lints, assert_suggestion_result},- };+ use super::GoSoFarAsTo;+ use crate::linting::tests::{assert_no_lints, assert_suggestion_result};#[test]fn go_so_far_to() {diff --git a/harper-core/src/linting/have_take_a_look.rs b/harper-core/src/linting/have_take_a_look.rsindex da31ebf55..dcddfe96c 100644--- a/harper-core/src/linting/have_take_a_look.rs+++ b/harper-core/src/linting/have_take_a_look.rs@@ -93,10 +93,8 @@ impl ExprLinter for HaveTakeALook {#[cfg(test)]mod tests {- use crate::{- Dialect,- linting::{HaveTakeALook, tests::assert_suggestion_result},- };+ use super::HaveTakeALook;+ use crate::{Dialect, linting::tests::assert_suggestion_result};#[test]fn correct_taking_a_look() {diff --git a/harper-core/src/linting/in_on_the_cards.rs b/harper-core/src/linting/in_on_the_cards.rsindex c0b42a707..488e974e6 100644--- a/harper-core/src/linting/in_on_the_cards.rs+++ b/harper-core/src/linting/in_on_the_cards.rs@@ -88,12 +88,10 @@ impl ExprLinter for InOnTheCards {#[cfg(test)]mod tests {+ use super::InOnTheCards;use crate::{Dialect,- linting::{- InOnTheCards,- tests::{assert_lint_count, assert_suggestion_result},- },+ linting::tests::{assert_lint_count, assert_suggestion_result},};// On the cardsdiff --git a/harper-core/src/linting/lint_group.rs b/harper-core/src/linting/lint_group.rsindex 986171301..6a8e75453 100644--- a/harper-core/src/linting/lint_group.rs+++ b/harper-core/src/linting/lint_group.rs@@ -43,6 +43,7 @@ use super::compound_subject_i::CompoundSubjectI;use super::confident::Confident;use super::correct_number_suffix::CorrectNumberSuffix;use super::criteria_phenomena::CriteriaPhenomena;+use super::currency_placement::CurrencyPlacement;use super::despite_of::DespiteOf;use super::didnt::Didnt;use super::discourse_markers::DiscourseMarkers;@@ -88,6 +89,7 @@ use super::lets_confusion::LetsConfusion;use super::likewise::Likewise;use super::long_sentences::LongSentences;use super::looking_forward_to::LookingForwardTo;+use super::mass_plurals::MassPlurals;use super::merge_words::MergeWords;use super::missing_preposition::MissingPreposition;use super::missing_to::MissingTo;@@ -104,9 +106,11 @@ use super::nail_on_the_head::NailOnTheHead;use super::need_to_noun::NeedToNoun;use super::no_french_spaces::NoFrenchSpaces;use super::no_match_for::NoMatchFor;+use super::no_oxford_comma::NoOxfordComma;use super::nobody::Nobody;use super::nominal_wants::NominalWants;use super::noun_countability::NounCountability;+use super::noun_verb_confusion::NounVerbConfusion;use super::number_suffix_capitalization::NumberSuffixCapitalization;use super::of_course::OfCourse;use super::on_floor::OnFloor;@@ -116,6 +120,7 @@ use super::open_the_light::OpenTheLight;use super::orthographic_consistency::OrthographicConsistency;use super::ought_to_be::OughtToBe;use super::out_of_date::OutOfDate;+use super::oxford_comma::OxfordComma;use super::oxymorons::Oxymorons;use super::phrasal_verb_as_compound_noun::PhrasalVerbAsCompoundNoun;use super::pique_interest::PiqueInterest;@@ -179,15 +184,12 @@ use super::widely_accepted::WidelyAccepted;use super::win_prize::WinPrize;use super::wordpress_dotcom::WordPressDotcom;use super::would_never_have::WouldNeverHave;-use super::{CurrencyPlacement, HtmlDescriptionLinter, Linter, NoOxfordComma, OxfordComma};use super::{ExprLinter, Lint};+use super::{HtmlDescriptionLinter, Linter};use crate::linting::dashes::Dashes;use crate::linting::expr_linter::Chunk;use crate::linting::open_compounds::OpenCompounds;-use crate::linting::{- MassPlurals, NounVerbConfusion, closed_compounds, initialisms, phrase_corrections,- phrase_set_corrections,-};+use crate::linting::{closed_compounds, initialisms, phrase_corrections, phrase_set_corrections};use crate::spell::{Dictionary, MutableDictionary};use crate::{CharString, Dialect, Document, TokenStringExt};diff --git a/harper-core/src/linting/mod.rs b/harper-core/src/linting/mod.rsindex 252bac9bd..04d03ea45 100644--- a/harper-core/src/linting/mod.rs+++ b/harper-core/src/linting/mod.rs@@ -197,183 +197,15 @@ mod win_prize;mod wordpress_dotcom;mod would_never_have;-pub use a_part::APart;-pub use addicting::Addicting;-pub use adjective_double_degree::AdjectiveDoubleDegree;-pub use adjective_of_a::AdjectiveOfA;-pub use after_later::AfterLater;-pub use all_intents_and_purposes::AllIntentsAndPurposes;-pub use allow_to::AllowTo;-pub use am_in_the_morning::AmInTheMorning;-pub use amounts_for::AmountsFor;-pub use an_a::AnA;-pub use and_in::AndIn;-pub use and_the_like::AndTheLike;-pub use another_thing_coming::AnotherThingComing;-pub use another_think_coming::AnotherThinkComing;-pub use ask_no_preposition::AskNoPreposition;-pub use avoid_curses::AvoidCurses;-pub use back_in_the_day::BackInTheDay;-pub use be_allowed::BeAllowed;-pub use best_of_all_time::BestOfAllTime;-pub use boring_words::BoringWords;-pub use bought::Bought;-pub use cant::Cant;-pub use capitalize_personal_pronouns::CapitalizePersonalPronouns;-pub use cautionary_tale::CautionaryTale;-pub use change_tack::ChangeTack;-pub use chock_full::ChockFull;-pub use comma_fixes::CommaFixes;-pub use compound_nouns::CompoundNouns;-pub use compound_subject_i::CompoundSubjectI;-pub use confident::Confident;-pub use correct_number_suffix::CorrectNumberSuffix;-pub use criteria_phenomena::CriteriaPhenomena;-pub use currency_placement::CurrencyPlacement;-pub use dashes::Dashes;-pub use despite_of::DespiteOf;-pub use didnt::Didnt;-pub use discourse_markers::DiscourseMarkers;-pub use dot_initialisms::DotInitialisms;-pub use double_click::DoubleClick;-pub use double_modal::DoubleModal;-pub use ellipsis_length::EllipsisLength;-pub use everyday::Everyday;-pub use expand_memory_shorthands::ExpandMemoryShorthands;-pub use expand_time_shorthands::ExpandTimeShorthands;pub use expr_linter::ExprLinter;-pub use far_be_it::FarBeIt;-pub use feel_fell::FeelFell;-pub use few_units_of_time_ago::FewUnitsOfTimeAgo;-pub use filler_words::FillerWords;-pub use find_fine::FindFine;-pub use for_noun::ForNoun;-pub use free_predicate::FreePredicate;-pub use friend_of_me::FriendOfMe;-pub use go_so_far_as_to::GoSoFarAsTo;-pub use have_pronoun::HavePronoun;-pub use have_take_a_look::HaveTakeALook;-pub use hedging::Hedging;-pub use hello_greeting::HelloGreeting;-pub use hereby::Hereby;-pub use hop_hope::HopHope;-pub use how_to::HowTo;-pub use hyphenate_number_day::HyphenateNumberDay;-pub use i_am_agreement::IAmAgreement;-pub use if_wouldve::IfWouldve;-pub use in_on_the_cards::InOnTheCards;-pub use inflected_verb_after_to::InflectedVerbAfterTo;pub use initialism_linter::InitialismLinter;-pub use interested_in::InterestedIn;-pub use it_looks_like_that::ItLooksLikeThat;-pub use its_contraction::ItsContraction;-pub use its_possessive::ItsPossessive;-pub use left_right_hand::LeftRightHand;-pub use less_worse::LessWorse;-pub use let_to_do::LetToDo;-pub use lets_confusion::LetsConfusion;-pub use likewise::Likewise;pub use lint::Lint;pub use lint_group::{LintGroup, LintGroupConfig};pub use lint_kind::LintKind;-pub use long_sentences::LongSentences;-pub use looking_forward_to::LookingForwardTo;pub use map_phrase_linter::MapPhraseLinter;pub use map_phrase_set_linter::MapPhraseSetLinter;-pub use mass_plurals::MassPlurals;-pub use merge_words::MergeWords;-pub use missing_preposition::MissingPreposition;-pub use missing_to::MissingTo;-pub use misspell::Misspell;-pub use mixed_bag::MixedBag;-pub use modal_of::ModalOf;-pub use modal_seem::ModalSeem;-pub use months::Months;-pub use more_better::MoreBetter;-pub use most_number::MostNumber;-pub use most_of_the_times::MostOfTheTimes;-pub use multiple_sequential_pronouns::MultipleSequentialPronouns;-pub use nail_on_the_head::NailOnTheHead;-pub use need_to_noun::NeedToNoun;-pub use no_french_spaces::NoFrenchSpaces;-pub use no_match_for::NoMatchFor;-pub use no_oxford_comma::NoOxfordComma;-pub use nobody::Nobody;-pub use noun_countability::NounCountability;-pub use noun_verb_confusion::NounVerbConfusion;-pub use number_suffix_capitalization::NumberSuffixCapitalization;-pub use of_course::OfCourse;-pub use on_floor::OnFloor;-pub use once_or_twice::OnceOrTwice;-pub use one_and_the_same::OneAndTheSame;-pub use open_the_light::OpenTheLight;-pub use orthographic_consistency::OrthographicConsistency;-pub use ought_to_be::OughtToBe;-pub use out_of_date::OutOfDate;-pub use oxford_comma::OxfordComma;-pub use oxymorons::Oxymorons;-pub use phrasal_verb_as_compound_noun::PhrasalVerbAsCompoundNoun;-pub use pique_interest::PiqueInterest;-pub use possessive_noun::PossessiveNoun;-pub use possessive_your::PossessiveYour;-pub use progressive_needs_be::ProgressiveNeedsBe;-pub use pronoun_are::PronounAre;-pub use pronoun_contraction::PronounContraction;-pub use pronoun_inflection_be::PronounInflectionBe;-pub use quantifier_needs_of::QuantifierNeedsOf;-pub use quantifier_numeral_conflict::QuantifierNumeralConflict;-pub use quite_quiet::QuiteQuiet;-pub use quote_spacing::QuoteSpacing;-pub use redundant_additive_adverbs::RedundantAdditiveAdverbs;-pub use regionalisms::Regionalisms;-pub use repeated_words::RepeatedWords;-pub use roller_skated::RollerSkated;-pub use safe_to_save::SafeToSave;-pub use save_to_safe::SaveToSafe;-pub use semicolon_apostrophe::SemicolonApostrophe;-pub use sentence_capitalization::SentenceCapitalization;-pub use shoot_oneself_in_the_foot::ShootOneselfInTheFoot;-pub use simple_past_to_past_participle::SimplePastToPastParticiple;-pub use since_duration::SinceDuration;-pub use single_be::SingleBe;-pub use some_without_article::SomeWithoutArticle;-pub use something_is::SomethingIs;-pub use somewhat_something::SomewhatSomething;-pub use sought_after::SoughtAfter;-pub use spaces::Spaces;pub use spell_check::SpellCheck;-pub use spelled_numbers::SpelledNumbers;-pub use split_words::SplitWords;pub use suggestion::Suggestion;-pub use take_serious::TakeSerious;-pub use that_than::ThatThan;-pub use that_which::ThatWhich;-pub use the_how_why::TheHowWhy;-pub use the_my::TheMy;-pub use then_than::ThenThan;-pub use theres::Theres;-pub use theses_these::ThesesThese;-pub use thing_think::ThingThink;-pub use though_thought::ThoughThought;-pub use throw_away::ThrowAway;-pub use throw_rubbish::ThrowRubbish;-pub use to_adverb::ToAdverb;-pub use to_two_too::ToTwoToo;-pub use touristic::Touristic;-pub use unclosed_quotes::UnclosedQuotes;-pub use update_place_names::UpdatePlaceNames;-pub use use_genitive::UseGenitive;-pub use verb_to_adjective::VerbToAdjective;-pub use very_unique::VeryUnique;-pub use vice_versa::ViceVersa;-pub use was_aloud::WasAloud;-pub use way_too_adjective::WayTooAdjective;-pub use well_educated::WellEducated;-pub use whereas::Whereas;-pub use widely_accepted::WidelyAccepted;-pub use win_prize::WinPrize;-pub use wordpress_dotcom::WordPressDotcom;-pub use would_never_have::WouldNeverHave;use crate::{Document, LSend, render_markdown};diff --git a/harper-core/src/linting/more_better.rs b/harper-core/src/linting/more_better.rsindex 76b6096cb..df131b7ab 100644--- a/harper-core/src/linting/more_better.rs+++ b/harper-core/src/linting/more_better.rs@@ -74,7 +74,8 @@ impl ExprLinter for MoreBetter {#[cfg(test)]mod tests {- use crate::linting::{MoreBetter, tests::assert_suggestion_result};+ use super::MoreBetter;+ use crate::linting::tests::assert_suggestion_result;#[test]fn flag_most_biggest() {diff --git a/harper-core/src/linting/redundant_additive_adverbs.rs b/harper-core/src/linting/redundant_additive_adverbs.rsindex 889542367..2ad947fc6 100644--- a/harper-core/src/linting/redundant_additive_adverbs.rs+++ b/harper-core/src/linting/redundant_additive_adverbs.rs@@ -117,10 +117,8 @@ impl ExprLinter for RedundantAdditiveAdverbs {#[cfg(test)]mod tests {- use crate::linting::{- RedundantAdditiveAdverbs,- tests::{assert_lint_count, assert_top3_suggestion_result},- };+ use super::RedundantAdditiveAdverbs;+ use crate::linting::tests::{assert_lint_count, assert_top3_suggestion_result};// Basic unit testsdiff --git a/harper-core/src/linting/semicolon_apostrophe.rs b/harper-core/src/linting/semicolon_apostrophe.rsindex f58488770..4f7075d3e 100644--- a/harper-core/src/linting/semicolon_apostrophe.rs+++ b/harper-core/src/linting/semicolon_apostrophe.rs@@ -65,10 +65,8 @@ impl ExprLinter for SemicolonApostrophe {#[cfg(test)]mod tests {- use crate::linting::{- SemicolonApostrophe,- tests::{assert_lint_count, assert_suggestion_result},- };+ use super::SemicolonApostrophe;+ use crate::linting::tests::{assert_lint_count, assert_suggestion_result};#[test]fn fix_dont_with_semicolon_to_apostrophe() {diff --git a/harper-core/src/linting/since_duration.rs b/harper-core/src/linting/since_duration.rsindex 5ac1340b1..b14ba9544 100644--- a/harper-core/src/linting/since_duration.rs+++ b/harper-core/src/linting/since_duration.rs@@ -93,7 +93,7 @@ impl ExprLinter for SinceDuration {#[cfg(test)]mod tests {- use crate::linting::SinceDuration;+ use super::SinceDuration;use crate::linting::tests::{assert_lint_count, assert_top3_suggestion_result};#[test]diff --git a/harper-core/src/linting/that_than.rs b/harper-core/src/linting/that_than.rsindex 117f8c153..13d0c2288 100644--- a/harper-core/src/linting/that_than.rs+++ b/harper-core/src/linting/that_than.rs@@ -61,10 +61,8 @@ impl ExprLinter for ThatThan {#[cfg(test)]mod tests {- use crate::linting::{- ThatThan,- tests::{assert_lint_count, assert_suggestion_result},- };+ use super::ThatThan;+ use crate::linting::tests::{assert_lint_count, assert_suggestion_result};// adj-er thatdiff --git a/harper-core/src/linting/thing_think.rs b/harper-core/src/linting/thing_think.rsindex c4a32b235..ac93a6686 100644--- a/harper-core/src/linting/thing_think.rs+++ b/harper-core/src/linting/thing_think.rs@@ -106,7 +106,8 @@ impl ExprLinter for ThingThink {#[cfg(test)]mod tests {- use crate::linting::{ThingThink, tests::assert_suggestion_result};+ use super::ThingThink;+ use crate::linting::tests::assert_suggestion_result;// Pronounsdiff --git a/harper-core/src/linting/though_thought.rs b/harper-core/src/linting/though_thought.rsindex 651222c5f..9f3265160 100644--- a/harper-core/src/linting/though_thought.rs+++ b/harper-core/src/linting/though_thought.rs@@ -62,10 +62,8 @@ impl ExprLinter for ThoughThought {#[cfg(test)]mod tests {- use crate::linting::{- ThoughThought,- tests::{assert_no_lints, assert_suggestion_result},- };+ use super::ThoughThought;+ use crate::linting::tests::{assert_no_lints, assert_suggestion_result};#[test]fn fix_i_though_i() {diff --git a/harper-core/src/linting/very_unique.rs b/harper-core/src/linting/very_unique.rsindex 0331c26d2..5163a9c1f 100644--- a/harper-core/src/linting/very_unique.rs+++ b/harper-core/src/linting/very_unique.rs@@ -70,10 +70,8 @@ impl ExprLinter for VeryUnique {#[cfg(test)]mod tests {- use crate::linting::{- VeryUnique,- tests::{assert_good_and_bad_suggestions, assert_top3_suggestion_result},- };+ use super::VeryUnique;+ use crate::linting::tests::{assert_good_and_bad_suggestions, assert_top3_suggestion_result};#[test]fn fix_very_unique() {diff --git a/packages/web/src/routes/docs/contributors/author-a-rule/+page.md b/packages/web/src/routes/docs/contributors/author-a-rule/+page.mdindex c09b63d07..6e86b5af5 100644--- a/packages/web/src/routes/docs/contributors/author-a-rule/+page.md+++ b/packages/web/src/routes/docs/contributors/author-a-rule/+page.md@@ -147,7 +147,6 @@ mod avoid_curses;mod boring_words;mod capitalize_personal_pronouns;// [svp! df:+]mod my_rule;-// [svp! df:+]pub use my_rule::MyRule;```Next, we need to configure whether your rule will be enabled by default.