Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions harper-core/src/linting/a_part.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::expr::Expr;
use crate::expr::FirstMatchOf;
use crate::expr::FixedPhrase;
use crate::linting::expr_linter::Chunk;
use crate::{
Token, TokenStringExt,
linting::{ExprLinter, Lint, LintKind, Suggestion},
Expand All @@ -26,6 +27,8 @@ impl Default for APart {
}

impl ExprLinter for APart {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/addicting.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::linting::expr_linter::Chunk;
use crate::{
Token,
expr::{All, AnchorEnd, Expr, FirstMatchOf, LongestMatchOf, ReflexivePronoun, SequenceExpr},
Expand Down Expand Up @@ -34,6 +35,8 @@ impl Default for Addicting {
}

impl ExprLinter for Addicting {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/adjective_double_degree.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::linting::expr_linter::Chunk;
use crate::{
CharStringExt, Token, TokenStringExt,
expr::{Expr, SequenceExpr},
Expand All @@ -21,6 +22,8 @@ impl Default for AdjectiveDoubleDegree {
}

impl ExprLinter for AdjectiveDoubleDegree {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/after_later.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::Token;
use crate::expr::{DurationExpr, Expr, SequenceExpr};
use crate::linting::expr_linter::Chunk;
use crate::linting::{ExprLinter, Lint, LintKind, Suggestion};
use crate::token_string_ext::TokenStringExt;

Expand Down Expand Up @@ -41,6 +42,8 @@ impl Default for AfterLater {
}

impl ExprLinter for AfterLater {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/all_intents_and_purposes.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::Token;
use crate::char_string::CharStringExt;
use crate::expr::{Expr, SequenceExpr};
use crate::linting::expr_linter::Chunk;
use crate::linting::{ExprLinter, Lint, LintKind, Suggestion};
use crate::token_string_ext::TokenStringExt;

Expand Down Expand Up @@ -41,6 +42,8 @@ impl Default for AllIntentsAndPurposes {
}

impl ExprLinter for AllIntentsAndPurposes {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/allow_to.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::expr::{Expr, SequenceExpr};
use crate::linting::expr_linter::Chunk;
use crate::linting::{ExprLinter, Lint, LintKind};
use crate::token::Token;
use crate::token_string_ext::TokenStringExt;
Expand All @@ -24,6 +25,8 @@ impl Default for AllowTo {
}

impl ExprLinter for AllowTo {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.exp.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/am_in_the_morning.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::linting::expr_linter::Chunk;
use crate::{
Span, Token, TokenStringExt,
expr::{Expr, FixedPhrase, LongestMatchOf, SequenceExpr},
Expand Down Expand Up @@ -40,6 +41,8 @@ impl Default for AmInTheMorning {
}

impl ExprLinter for AmInTheMorning {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/amounts_for.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::expr::SequenceExpr;
use crate::{Token, TokenStringExt, patterns::WordSet};

use super::{ExprLinter, Lint, LintKind, Suggestion};
use crate::linting::expr_linter::Chunk;

pub struct AmountsFor {
expr: Box<dyn Expr>,
Expand Down Expand Up @@ -38,6 +39,8 @@ impl Default for AmountsFor {
}

impl ExprLinter for AmountsFor {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/and_in.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::Token;
use crate::expr::{Expr, SequenceExpr};
use crate::linting::expr_linter::Chunk;
use crate::linting::{ExprLinter, Lint, LintKind, Suggestion};

pub struct AndIn {
Expand All @@ -15,6 +16,8 @@ impl Default for AndIn {
}

impl ExprLinter for AndIn {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
&*self.expr
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/and_the_like.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::expr::{All, Expr, FixedPhrase, SequenceExpr};
use crate::linting::expr_linter::Chunk;
use crate::linting::{ExprLinter, LintKind, Suggestion};
use crate::patterns::WordSet;
use crate::token_string_ext::TokenStringExt;
Expand Down Expand Up @@ -35,6 +36,8 @@ impl Default for AndTheLike {
}

impl ExprLinter for AndTheLike {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/another_thing_coming.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::linting::expr_linter::Chunk;
use crate::{
Token, TokenStringExt,
expr::{Expr, FixedPhrase, SequenceExpr},
Expand All @@ -23,6 +24,8 @@ impl Default for AnotherThingComing {
}

impl ExprLinter for AnotherThingComing {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/another_think_coming.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::linting::expr_linter::Chunk;
use crate::{
Token, TokenStringExt,
expr::{Expr, FixedPhrase, SequenceExpr},
Expand All @@ -23,6 +24,8 @@ impl Default for AnotherThinkComing {
}

impl ExprLinter for AnotherThinkComing {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/ask_no_preposition.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::expr::Expr;
use crate::expr::SequenceExpr;
use crate::linting::expr_linter::Chunk;
use crate::{
Span, Token,
linting::{ExprLinter, Lint, LintKind, Suggestion},
Expand Down Expand Up @@ -32,6 +33,8 @@ impl Default for AskNoPreposition {
}

impl ExprLinter for AskNoPreposition {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/avoid_curses.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use crate::expr::{Expr, SequenceExpr};
use crate::linting::{LintKind, Suggestion};

use super::{ExprLinter, Lint};
use crate::linting::expr_linter::Chunk;

pub struct AvoidCurses {
expr: Box<dyn Expr>,
Expand All @@ -17,6 +18,8 @@ impl Default for AvoidCurses {
}

impl ExprLinter for AvoidCurses {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/back_in_the_day.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use crate::{
};

use super::{ExprLinter, Lint, LintKind, Suggestion};
use crate::linting::expr_linter::Chunk;

pub struct BackInTheDay {
expr: Box<dyn Expr>,
Expand All @@ -34,6 +35,8 @@ impl Default for BackInTheDay {
}

impl ExprLinter for BackInTheDay {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/be_allowed.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::sync::Arc;

use crate::linting::expr_linter::Chunk;
use crate::{
Token,
expr::{Expr, ExprMap, SequenceExpr},
Expand Down Expand Up @@ -51,6 +52,8 @@ impl Default for BeAllowed {
}

impl ExprLinter for BeAllowed {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/best_of_all_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use crate::expr::{Expr, SequenceExpr};
use crate::patterns::WhitespacePattern;

use super::{ExprLinter, Lint, LintKind, Suggestion};
use crate::linting::expr_linter::Chunk;

pub struct BestOfAllTime {
expr: Box<dyn Expr>,
Expand Down Expand Up @@ -37,6 +38,8 @@ impl Default for BestOfAllTime {
}

impl ExprLinter for BestOfAllTime {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/boring_words.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use crate::expr::{Expr, WordExprGroup};
use crate::{Token, TokenStringExt};

use super::{ExprLinter, Lint, LintKind};
use crate::linting::expr_linter::Chunk;

pub struct BoringWords {
expr: Box<dyn Expr>,
Expand All @@ -24,6 +25,8 @@ impl Default for BoringWords {
}

impl ExprLinter for BoringWords {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/bought.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use super::{ExprLinter, Lint, LintKind};
use crate::Token;
use crate::expr::{Expr, SequenceExpr};
use crate::linting::Suggestion;
use crate::linting::expr_linter::Chunk;

pub struct Bought {
expr: Box<dyn Expr>,
Expand All @@ -24,6 +25,8 @@ impl Default for Bought {
}

impl ExprLinter for Bought {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/call_them.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::patterns::{DerivedFrom, WordSet};
use crate::{Token, TokenStringExt};

use super::{ExprLinter, Lint, LintKind, Suggestion};
use crate::linting::expr_linter::Chunk;

pub struct CallThem {
expr: Box<dyn Expr>,
Expand Down Expand Up @@ -53,6 +54,8 @@ impl Default for CallThem {
}

impl ExprLinter for CallThem {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/cant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use super::{ExprLinter, Suggestion};
use crate::Lint;
use crate::expr::{Expr, LongestMatchOf, SequenceExpr};
use crate::linting::LintKind;
use crate::linting::expr_linter::Chunk;
use crate::linting::expr_linter::find_the_only_token_matching;
use crate::{CharStringExt, Token};

Expand Down Expand Up @@ -31,6 +32,8 @@ impl Default for Cant {
}

impl ExprLinter for Cant {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/cautionary_tale.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::linting::expr_linter::Chunk;
use crate::{
Token,
expr::{Expr, SequenceExpr},
Expand Down Expand Up @@ -27,6 +28,8 @@ impl Default for CautionaryTale {
}

impl ExprLinter for CautionaryTale {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/change_tack.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::Token;
use crate::expr::{Expr, SequenceExpr};
use crate::linting::expr_linter::Chunk;
use crate::linting::{ExprLinter, Lint, LintKind, Suggestion};
use crate::patterns::Word;

Expand Down Expand Up @@ -33,6 +34,8 @@ impl Default for ChangeTack {
}

impl ExprLinter for ChangeTack {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
3 changes: 3 additions & 0 deletions harper-core/src/linting/chock_full.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use crate::expr::SpaceOrHyphen;
use crate::{Token, TokenStringExt, patterns::WordSet};

use super::{ExprLinter, Lint, LintKind, Suggestion};
use crate::linting::expr_linter::Chunk;

pub struct ChockFull {
expr: Box<dyn Expr>,
Expand All @@ -23,6 +24,8 @@ impl Default for ChockFull {
}

impl ExprLinter for ChockFull {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::expr::SequenceExpr;
use crate::{CharStringExt, TokenStringExt, linting::ExprLinter};

use super::{Lint, LintKind, Suggestion, is_content_word, predicate};
use crate::linting::expr_linter::Chunk;

use crate::{Lrc, Token};

Expand Down Expand Up @@ -53,6 +54,8 @@ impl Default for CompoundNounAfterDetAdj {
}

impl ExprLinter for CompoundNounAfterDetAdj {
type Unit = Chunk;

fn expr(&self) -> &dyn Expr {
self.expr.as_ref()
}
Expand Down
Loading
Loading