repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/semicolon_apostrophe.rs
harper-core/src/linting/semicolon_apostrophe.rs
use crate::linting::expr_linter::Chunk; use crate::{ Token, TokenStringExt, expr::{Expr, SequenceExpr}, linting::{ExprLinter, Lint, LintKind, Suggestion}, patterns::WordSet, }; const CONTRACTION_AND_POSSESSIVE_ENDINGS: [&str; 7] = ["d", "ll", "m", "re", "s", "t", "ve"]; pub struct SemicolonApostrophe ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/a_while.rs
harper-core/src/linting/a_while.rs
use std::sync::Arc; use harper_brill::UPOS; use crate::char_string::char_string; use crate::expr::{Expr, ExprMap, SequenceExpr}; use crate::patterns::UPOSSet; use crate::{CharString, Token, TokenStringExt}; use super::expr_linter::Chunk; use super::{ExprLinter, Lint, LintKind, Suggestion}; pub struct AWhile { e...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/looking_forward_to.rs
harper-core/src/linting/looking_forward_to.rs
use hashbrown::HashSet; use crate::linting::expr_linter::Chunk; use crate::{ Token, expr::{Expr, FixedPhrase, SequenceExpr}, linting::{ExprLinter, Lint, LintKind, Suggestion}, }; pub struct LookingForwardTo { expr: Box<dyn Expr>, } impl Default for LookingForwardTo { fn default() -> Self { ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/it_is.rs
harper-core/src/linting/it_is.rs
use crate::expr::{Expr, SequenceExpr}; use crate::linting::expr_linter::Chunk; use crate::{ Token, TokenKind, linting::{ExprLinter, Lint, LintKind, Suggestion}, }; pub struct ItIs { expr: Box<dyn Expr>, } impl Default for ItIs { fn default() -> Self { let pattern = SequenceExpr::default() ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/touristic.rs
harper-core/src/linting/touristic.rs
use crate::linting::expr_linter::Chunk; use crate::{ Token, TokenStringExt, expr::{Expr, LongestMatchOf, SequenceExpr}, linting::{ExprLinter, Lint, LintKind, Suggestion}, }; #[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] pub enum SuggestionPreference { /// Explicitly allow this suggestion Al...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/months.rs
harper-core/src/linting/months.rs
use crate::linting::expr_linter::Chunk; use crate::{ Lrc, Token, TokenKind, expr::{Expr, FirstMatchOf, SequenceExpr}, linting::{ExprLinter, Lint, LintKind, Suggestion}, patterns::WordSet, }; // Static array of all month names const ALL_MONTHS: &[&str] = &[ "january", "february", "march", ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/all_intents_and_purposes.rs
harper-core/src/linting/all_intents_and_purposes.rs
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; pub struct AllIntentsAndPurposes { expr: Box<dyn Expr>, } impl Default ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/spelled_numbers.rs
harper-core/src/linting/spelled_numbers.rs
use crate::linting::{LintKind, Linter, Suggestion}; use crate::{Document, Lint, Number, TokenStringExt}; /// Linter that checks to make sure small integers (< 10) are spelled /// out. #[derive(Default, Clone, Copy)] pub struct SpelledNumbers; impl Linter for SpelledNumbers { fn lint(&mut self, document: &Document...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/the_how_why.rs
harper-core/src/linting/the_how_why.rs
use crate::expr::Expr; use crate::expr::FirstMatchOf; use crate::expr::SequenceExpr; use crate::linting::expr_linter::Chunk; use crate::{ Token, TokenStringExt, linting::{ExprLinter, Lint, LintKind, Suggestion}, }; /// Suggests removing `the` when followed by how/why/who/when/what, /// skipping cases like `how...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/roller_skated.rs
harper-core/src/linting/roller_skated.rs
use std::sync::Arc; use crate::linting::expr_linter::Chunk; use crate::{ Token, TokenKind, TokenStringExt, expr::{AnchorStart, Expr, ExprMap, SequenceExpr}, linting::{ExprLinter, Lint, LintKind, Suggestion}, }; /// Suggests hyphenating the past tense of `roller-skate`. pub struct RollerSkated { expr: ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/avoid_curses.rs
harper-core/src/linting/avoid_curses.rs
use crate::Token; 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>, } impl Default for AvoidCurses { fn default() -> Self { Self { expr: Bo...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/lint_kind.rs
harper-core/src/linting/lint_kind.rs
use std::fmt::Display; use is_macro::Is; use serde::{Deserialize, Serialize}; /// The general category a [`Lint`](super::Lint) falls into. /// There's no reason not to add a new item here if you are adding a new rule that doesn't fit /// the existing categories. #[derive(Debug, Clone, Copy, Serialize, Deserialize, Is...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/chock_full.rs
harper-core/src/linting/chock_full.rs
use crate::expr::Expr; use crate::expr::SequenceExpr; 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>, } impl Default for ChockFull { ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/open_compounds.rs
harper-core/src/linting/open_compounds.rs
use crate::expr::{Expr, LongestMatchOf, SequenceExpr}; use crate::{Lrc, Token, patterns::WordSet}; use super::{ExprLinter, Lint, LintKind, Suggestion}; use crate::linting::expr_linter::Chunk; use hashbrown::HashMap; pub struct OpenCompounds { expr: Box<dyn Expr>, compound_to_phrase: HashMap<String, String>, }...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/discourse_markers.rs
harper-core/src/linting/discourse_markers.rs
use harper_brill::UPOS; use crate::expr::{Expr, FirstMatchOf, FixedPhrase, SequenceExpr}; use crate::patterns::UPOSSet; use crate::{Document, Token, TokenStringExt}; use super::{Lint, LintKind, Linter, Suggestion}; pub struct DiscourseMarkers { expr: SequenceExpr, } impl DiscourseMarkers { pub fn new() -> S...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/whereas.rs
harper-core/src/linting/whereas.rs
use crate::expr::Expr; use crate::expr::SequenceExpr; use crate::{Token, TokenStringExt}; use super::{ExprLinter, Lint, LintKind, Suggestion}; use crate::linting::expr_linter::Chunk; pub struct Whereas { expr: Box<dyn Expr>, } impl Default for Whereas { fn default() -> Self { let pattern = SequenceEx...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/spaces.rs
harper-core/src/linting/spaces.rs
use super::{Lint, LintKind, Linter, Suggestion}; use crate::TokenStringExt; use crate::{Document, Token, TokenKind}; #[derive(Debug, Default)] pub struct Spaces; impl Linter for Spaces { fn lint(&mut self, document: &Document) -> Vec<Lint> { let mut output = Vec::new(); for sentence in document.i...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/multiple_sequential_pronouns.rs
harper-core/src/linting/multiple_sequential_pronouns.rs
use super::Suggestion; use super::expr_linter::ExprLinter; use crate::expr::Expr; use crate::expr::SequenceExpr; use crate::linting::LintKind; use crate::linting::expr_linter::Chunk; use crate::patterns::WordSet; use crate::{CharStringExt, Lint, Lrc, Token, TokenStringExt}; /// Linter that checks if multiple pronouns ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/missing_preposition.rs
harper-core/src/linting/missing_preposition.rs
use harper_brill::UPOS; use crate::expr::AnchorStart; use crate::expr::Expr; use crate::expr::OwnedExprExt; use crate::expr::SequenceExpr; use crate::patterns::AnyPattern; use crate::patterns::UPOSSet; use crate::{Token, TokenStringExt}; use super::{ExprLinter, Lint, LintKind}; use crate::linting::expr_linter::Chunk;...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/adjective_double_degree.rs
harper-core/src/linting/adjective_double_degree.rs
use crate::linting::expr_linter::Chunk; use crate::{ CharStringExt, Token, TokenStringExt, expr::{Expr, SequenceExpr}, linting::{ExprLinter, Lint, LintKind, Suggestion}, }; pub struct AdjectiveDoubleDegree { expr: Box<dyn Expr>, } impl Default for AdjectiveDoubleDegree { fn default() -> Self { ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/nail_on_the_head.rs
harper-core/src/linting/nail_on_the_head.rs
use crate::expr::Expr; use crate::expr::SequenceExpr; use crate::linting::expr_linter::Chunk; use crate::{ Token, linting::{ExprLinter, Lint, LintKind, Suggestion}, patterns::WordSet, }; pub struct NailOnTheHead { expr: Box<dyn Expr>, } impl Default for NailOnTheHead { fn default() -> Self { ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/closed_compounds.rs
harper-core/src/linting/closed_compounds.rs
use crate::linting::LintGroup; use super::MapPhraseLinter; pub fn lint_group() -> LintGroup { let mut group = LintGroup::empty(); macro_rules! add_compound_mappings { ($group:expr, { $($name:expr => ($bad:expr, $good:expr)),+ $(,)? }) => { $( $group.add( ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/few_units_of_time_ago.rs
harper-core/src/linting/few_units_of_time_ago.rs
use crate::expr::Expr; use crate::expr::SequenceExpr; use crate::expr::TimeUnitExpr; use crate::linting::expr_linter::Chunk; use crate::{ Lrc, Token, linting::{ExprLinter, Lint, Suggestion}, }; pub struct FewUnitsOfTimeAgo { expr: Box<dyn Expr>, } impl Default for FewUnitsOfTimeAgo { fn default() -> S...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/addicting.rs
harper-core/src/linting/addicting.rs
use crate::linting::expr_linter::Chunk; use crate::{ Token, expr::{All, AnchorEnd, Expr, FirstMatchOf, LongestMatchOf, ReflexivePronoun, SequenceExpr}, linting::{ExprLinter, Lint, LintKind, Suggestion}, }; pub struct Addicting { expr: Box<dyn Expr>, } impl Default for Addicting { fn default() -> S...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/missing_space.rs
harper-core/src/linting/missing_space.rs
use itertools::Itertools; use crate::{Document, Punctuation}; use super::{Lint, LintKind, Linter, Suggestion}; pub struct MissingSpace; impl Linter for MissingSpace { fn lint(&mut self, document: &Document) -> Vec<Lint> { let mut lints = Vec::new(); for (a, b, c) in document.tokens().tuple_wind...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/go_so_far_as_to.rs
harper-core/src/linting/go_so_far_as_to.rs
use crate::Token; use crate::TokenStringExt; use crate::expr::{Expr, SequenceExpr}; use crate::linting::Suggestion; use crate::linting::expr_linter::Chunk; use crate::linting::{ExprLinter, Lint, LintKind}; pub struct GoSoFarAsTo { exp: Box<dyn Expr>, } impl Default for GoSoFarAsTo { fn default() -> Self { ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/oxford_comma.rs
harper-core/src/linting/oxford_comma.rs
use crate::expr::Expr; use crate::expr::ExprExt; use crate::expr::OwnedExprExt; use crate::expr::SequenceExpr; use crate::{Lrc, Token, TokenStringExt, linting::Linter, patterns::WordSet}; use super::{super::Lint, LintKind, Suggestion}; pub struct OxfordComma { expr: Box<dyn Expr>, } impl Default for OxfordComma ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/missing_to.rs
harper-core/src/linting/missing_to.rs
use std::sync::Arc; use harper_brill::UPOS; use crate::linting::expr_linter::Chunk; use crate::{ Token, expr::{Expr, ExprMap, SequenceExpr}, linting::{ExprLinter, Lint, LintKind, Suggestion}, patterns::WordSet, }; pub struct MissingTo { expr: Box<dyn Expr>, map: Arc<ExprMap<usize>>, } impl M...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/orthographic_consistency.rs
harper-core/src/linting/orthographic_consistency.rs
use crate::linting::{LintKind, Suggestion}; use std::sync::Arc; use crate::expr::Expr; use crate::spell::{Dictionary, FstDictionary}; use crate::{OrthFlags, Token}; use super::{ExprLinter, Lint}; use crate::linting::expr_linter::Chunk; pub struct OrthographicConsistency { dict: Arc<FstDictionary>, expr: Box<...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/more_better.rs
harper-core/src/linting/more_better.rs
use crate::expr::{Expr, SequenceExpr}; use crate::linting::expr_linter::Chunk; use crate::linting::{ExprLinter, Lint, LintKind, Suggestion}; use crate::token::Token; use crate::token_string_ext::TokenStringExt; pub struct MoreBetter { expr: Box<dyn Expr>, } impl Default for MoreBetter { fn default() -> Self {...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/a_part.rs
harper-core/src/linting/a_part.rs
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}, }; pub struct APart { expr: Box<dyn Expr>, } impl Default for APart { fn default() -> Self ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/most_number.rs
harper-core/src/linting/most_number.rs
use crate::expr::All; use crate::expr::Expr; use crate::expr::SequenceExpr; use crate::{Token, TokenStringExt, patterns::WordSet}; use super::{ExprLinter, Lint, LintKind, Suggestion}; use crate::linting::expr_linter::Chunk; pub struct MostNumber { expr: Box<dyn Expr>, } impl Default for MostNumber { fn defau...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/open_the_light.rs
harper-core/src/linting/open_the_light.rs
use crate::expr::Expr; use crate::expr::LongestMatchOf; use crate::expr::SequenceExpr; use crate::{ Lrc, Token, TokenStringExt, linting::{LintKind, Suggestion}, patterns::WordSet, }; use super::{ExprLinter, Lint}; use crate::linting::expr_linter::Chunk; pub struct OpenTheLight { expr: Box<dyn Expr>, }...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/didnt.rs
harper-core/src/linting/didnt.rs
use crate::Token; use crate::expr::{Expr, SequenceExpr}; use crate::linting::expr_linter::Chunk; use crate::linting::{ExprLinter, Lint, LintKind, Suggestion}; pub struct Didnt { expr: Box<dyn Expr>, } impl Default for Didnt { fn default() -> Self { let pattern = SequenceExpr::default() .th...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/pronoun_are.rs
harper-core/src/linting/pronoun_are.rs
use crate::linting::expr_linter::Chunk; use crate::{ Token, TokenStringExt, expr::{Expr, SequenceExpr}, linting::{ExprLinter, Lint, LintKind, Suggestion}, }; /// Corrects the shorthand `r` after plural first- and second-person pronouns. pub struct PronounAre { expr: Box<dyn Expr>, } impl Default for P...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/ellipsis_length.rs
harper-core/src/linting/ellipsis_length.rs
use itertools::Itertools; use super::{Lint, LintKind, Linter, Suggestion}; use crate::TokenStringExt; /// A linter that checks that an ellipsis doesn't contain too many periods (or /// too few). #[derive(Debug, Default)] pub struct EllipsisLength; impl Linter for EllipsisLength { fn lint(&mut self, document: &cr...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/right_click.rs
harper-core/src/linting/right_click.rs
use std::sync::Arc; use crate::{ Token, TokenStringExt, expr::{Expr, ExprMap, SequenceExpr}, linting::expr_linter::Chunk, linting::{ExprLinter, Lint, LintKind, Suggestion}, patterns::DerivedFrom, }; pub struct RightClick { expr: Box<dyn Expr>, map: Arc<ExprMap<usize>>, } impl Default for ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/save_to_safe.rs
harper-core/src/linting/save_to_safe.rs
use crate::expr::Expr; use crate::expr::OwnedExprExt; use crate::expr::SequenceExpr; use crate::linting::expr_linter::Chunk; use crate::{ Token, linting::{ExprLinter, Lint, LintKind, Suggestion}, patterns::{InflectionOfBe, Word}, }; pub struct SaveToSafe { expr: Box<dyn Expr>, } impl Default for SaveT...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/hedging.rs
harper-core/src/linting/hedging.rs
use crate::expr::Expr; use crate::expr::FirstMatchOf; use crate::expr::FixedPhrase; use crate::linting::expr_linter::Chunk; use crate::linting::{ExprLinter, Lint, LintKind}; use crate::{Token, TokenStringExt}; /// A linter that detects hedging language. pub struct Hedging { expr: Box<dyn Expr>, } impl Default for...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/dot_initialisms.rs
harper-core/src/linting/dot_initialisms.rs
use crate::expr::Expr; use crate::expr::SequenceExpr; use crate::expr::WordExprGroup; use hashbrown::HashMap; use super::{ExprLinter, Lint, LintKind, Suggestion}; use crate::linting::expr_linter::Chunk; use crate::{Token, TokenStringExt}; pub struct DotInitialisms { expr: Box<dyn Expr>, corrections: HashMap<&...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/hereby.rs
harper-core/src/linting/hereby.rs
use crate::expr::Expr; use crate::expr::SequenceExpr; use crate::{Token, TokenStringExt}; use super::{ExprLinter, Lint, LintKind, Suggestion}; use crate::linting::expr_linter::Chunk; pub struct Hereby { expr: Box<dyn Expr>, } impl Default for Hereby { fn default() -> Self { let pattern = SequenceExpr...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/throw_rubbish.rs
harper-core/src/linting/throw_rubbish.rs
use super::{Lint, LintKind, Linter}; use crate::{Document, Span, TokenStringExt, linting::Suggestion}; use hashbrown::HashSet; use lazy_static::lazy_static; lazy_static! { static ref THROW: HashSet<&'static str> = HashSet::from(["throw", "throws", "threw", "thrown", "throwing"]); } lazy_static! { stat...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/well_educated.rs
harper-core/src/linting/well_educated.rs
use crate::{ Token, TokenStringExt, expr::{Expr, SequenceExpr}, patterns::{WhitespacePattern, WordSet}, }; use super::{ExprLinter, Lint, LintKind, Suggestion}; use crate::linting::expr_linter::Chunk; pub struct WellEducated { expr: Box<dyn Expr>, } impl Default for WellEducated { fn default() -> ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/friend_of_me.rs
harper-core/src/linting/friend_of_me.rs
use crate::linting::expr_linter::Chunk; use crate::{ Token, expr::{Expr, SequenceExpr}, linting::{ExprLinter, Lint, LintKind, Suggestion}, }; pub struct FriendOfMe { expr: Box<dyn Expr>, } impl Default for FriendOfMe { fn default() -> Self { Self { expr: Box::new( ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/for_noun.rs
harper-core/src/linting/for_noun.rs
use crate::expr::Expr; use crate::expr::OwnedExprExt; use crate::expr::SequenceExpr; use crate::{ Token, patterns::{NominalPhrase, Word}, }; use super::{ExprLinter, Lint, LintKind, Suggestion}; use crate::linting::expr_linter::Chunk; pub struct ForNoun { expr: Box<dyn Expr>, } impl Default for ForNoun { ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/transposed_space.rs
harper-core/src/linting/transposed_space.rs
use crate::{ Lint, Token, TokenStringExt, expr::{Expr, FirstMatchOf, SequenceExpr}, linting::{ExprLinter, LintKind, Suggestion, expr_linter::Chunk}, spell::Dictionary, }; pub struct TransposedSpace<D: Dictionary + 'static> { expr: Box<dyn Expr>, dict: D, } impl<D: Dictionary + 'static> Transpo...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/way_too_adjective.rs
harper-core/src/linting/way_too_adjective.rs
use harper_brill::UPOS; use crate::Token; use crate::expr::{All, Expr, OwnedExprExt, SequenceExpr}; use crate::patterns::{UPOSSet, WordSet}; use super::{ExprLinter, Lint, LintKind, Suggestion}; use crate::linting::expr_linter::Chunk; pub struct WayTooAdjective { expr: Box<dyn Expr>, } impl Default for WayTooAdj...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/phrasal_verb_as_compound_noun.rs
harper-core/src/linting/phrasal_verb_as_compound_noun.rs
use std::sync::Arc; use super::{Lint, LintKind, Linter, Suggestion}; use crate::spell::{Dictionary, FstDictionary}; use crate::{CharStringExt, Document, Span, TokenStringExt}; /// Detect phrasal verbs written as compound nouns. pub struct PhrasalVerbAsCompoundNoun { dict: Arc<FstDictionary>, } enum Confidence { ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/ask_no_preposition.rs
harper-core/src/linting/ask_no_preposition.rs
use crate::expr::Expr; use crate::expr::SequenceExpr; use crate::linting::expr_linter::Chunk; use crate::{ Span, Token, linting::{ExprLinter, Lint, LintKind, Suggestion}, patterns::WordSet, }; pub struct AskNoPreposition { expr: Box<dyn Expr>, } impl Default for AskNoPreposition { fn default() -> ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/unclosed_quotes.rs
harper-core/src/linting/unclosed_quotes.rs
use super::{Lint, LintKind, Linter}; use crate::document::Document; use crate::{Punctuation, Quote, TokenKind}; #[derive(Debug, Clone, Copy, Default)] pub struct UnclosedQuotes; impl Linter for UnclosedQuotes { fn lint(&mut self, document: &Document) -> Vec<Lint> { let mut lints = Vec::new(); // ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/thing_think.rs
harper-core/src/linting/thing_think.rs
use crate::linting::expr_linter::Chunk; use crate::{ Token, expr::{Expr, FirstMatchOf, FixedPhrase, SequenceExpr}, linting::{ExprLinter, Lint, LintKind, Suggestion}, patterns::WordSet, }; /// Corrects the typo "thing" for "think". pub struct ThingThink { expr: Box<dyn Expr>, } impl Default for Thi...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/left_right_hand.rs
harper-core/src/linting/left_right_hand.rs
use crate::expr::Expr; use crate::expr::SequenceExpr; use crate::{Token, patterns::WordSet}; use super::{ExprLinter, Lint, LintKind, Suggestion}; use crate::linting::expr_linter::Chunk; pub struct LeftRightHand { expr: Box<dyn Expr>, } impl Default for LeftRightHand { fn default() -> Self { let patte...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/map_phrase_linter.rs
harper-core/src/linting/map_phrase_linter.rs
use super::{ExprLinter, Lint, LintKind}; use crate::expr::Expr; use crate::expr::FixedPhrase; use crate::expr::LongestMatchOf; use crate::expr::SimilarToPhrase; use crate::linting::Suggestion; use crate::linting::expr_linter::Chunk; use crate::{Token, TokenStringExt}; pub struct MapPhraseLinter { description: Stri...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/cure_for.rs
harper-core/src/linting/cure_for.rs
use crate::{ Span, Token, expr::{Expr, SequenceExpr}, linting::expr_linter::Chunk, linting::{ExprLinter, Lint, LintKind, Suggestion}, patterns::{DerivedFrom, Word}, }; pub struct CureFor { expr: Box<dyn Expr>, } impl Default for CureFor { fn default() -> Self { let expr = SequenceE...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/compound_subject_i.rs
harper-core/src/linting/compound_subject_i.rs
use crate::linting::expr_linter::Chunk; use crate::{ Token, TokenKind, expr::{AnchorStart, Expr, SequenceExpr}, linting::{ExprLinter, Lint, LintKind, Suggestion}, }; const POSSESSIVE_DETERMINERS: &[&str] = &["my", "your", "her", "his", "their", "our"]; pub struct CompoundSubjectI { expr: Box<dyn Expr>...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/subject_pronoun.rs
harper-core/src/linting/subject_pronoun.rs
use crate::expr::{AnchorStart, Expr, SequenceExpr}; use crate::{Token, TokenStringExt}; use super::expr_linter::Chunk; use super::{ExprLinter, Lint, LintKind, Suggestion}; pub struct SubjectPronoun { expr: Box<dyn Expr>, } impl Default for SubjectPronoun { fn default() -> Self { let expr = SequenceEx...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/bought.rs
harper-core/src/linting/bought.rs
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>, } impl Default for Bought { fn default() -> Self { let subject = SequenceExpr::default() ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/nobody.rs
harper-core/src/linting/nobody.rs
use crate::expr::Expr; use crate::expr::SequenceExpr; use crate::{Token, TokenStringExt}; use super::{ExprLinter, Lint, LintKind, Suggestion}; use crate::linting::expr_linter::Chunk; pub struct Nobody { expr: Box<dyn Expr>, } impl Default for Nobody { fn default() -> Self { let pattern = SequenceExpr...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/good_at.rs
harper-core/src/linting/good_at.rs
use crate::{ Lint, Token, expr::{Expr, FirstMatchOf, SequenceExpr}, linting::{ExprLinter, LintKind, Suggestion, expr_linter::Chunk}, patterns::{InflectionOfBe, WordSet}, }; pub struct GoodAt { expr: Box<dyn Expr>, } impl Default for GoodAt { fn default() -> Self { let we_re_not_always_...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/adjective_of_a.rs
harper-core/src/linting/adjective_of_a.rs
use super::{Lint, LintKind, Linter, Suggestion}; use crate::{Document, Span, TokenStringExt}; /// Detect sequences of words of the form "adjective of a". #[derive(Debug, Clone, Copy, Default)] pub struct AdjectiveOfA; const ADJECTIVE_WHITELIST: &[&str] = &["bad", "big", "good", "large", "long", "vague"]; const CONTE...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/oxymorons.rs
harper-core/src/linting/oxymorons.rs
use crate::expr::Expr; use crate::expr::FirstMatchOf; use crate::expr::FixedPhrase; use crate::linting::expr_linter::Chunk; use crate::linting::{ExprLinter, Lint, LintKind}; use crate::{Token, TokenStringExt}; /// A linter that flags oxymoronic phrases. pub struct Oxymorons { expr: Box<dyn Expr>, } impl Oxymorons...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/be_allowed.rs
harper-core/src/linting/be_allowed.rs
use std::sync::Arc; use crate::linting::expr_linter::Chunk; use crate::{ Token, expr::{Expr, ExprMap, SequenceExpr}, linting::{ExprLinter, Lint, LintKind, Suggestion}, }; pub struct BeAllowed { expr: Box<dyn Expr>, map: Arc<ExprMap<usize>>, } impl Default for BeAllowed { fn default() -> Self ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/split_words.rs
harper-core/src/linting/split_words.rs
use crate::spell::Dictionary; use std::sync::Arc; use crate::Token; use crate::expr::Expr; use crate::linting::{LintKind, Suggestion}; use crate::spell::{FstDictionary, TrieDictionary}; use super::{ExprLinter, Lint}; use crate::linting::expr_linter::Chunk; pub struct SplitWords { dict: Arc<TrieDictionary<Arc<Fst...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/map_phrase_set_linter.rs
harper-core/src/linting/map_phrase_set_linter.rs
use super::{ExprLinter, Lint, LintKind}; use crate::CharStringExt; use crate::expr::Expr; use crate::expr::FixedPhrase; use crate::expr::LongestMatchOf; use crate::linting::Suggestion; use crate::linting::expr_linter::Chunk; use crate::{Token, TokenStringExt}; pub struct MapPhraseSetLinter<'a> { description: Strin...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/hello_greeting.rs
harper-core/src/linting/hello_greeting.rs
use crate::linting::expr_linter::Chunk; use crate::{ Token, expr::{AnchorStart, Expr, SequenceExpr}, linting::{ExprLinter, Lint, LintKind, Suggestion}, }; pub struct HelloGreeting { expr: Box<dyn Expr>, } impl Default for HelloGreeting { fn default() -> Self { let expr = SequenceExpr::defa...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/vice_versa.rs
harper-core/src/linting/vice_versa.rs
use crate::expr::{Expr, SequenceExpr}; use crate::linting::expr_linter::Chunk; use crate::linting::{ExprLinter, Lint, LintKind, Suggestion}; use crate::{Token, TokenStringExt}; fn matches_hyphen(token: &Token, _source: &[char]) -> bool { token.kind.is_hyphen() } fn replacement_for(template: &[char]) -> Vec<char> ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/everyday.rs
harper-core/src/linting/everyday.rs
use super::{ExprLinter, Lint, LintKind, Suggestion}; use crate::expr::All; use crate::expr::Expr; use crate::expr::LongestMatchOf; use crate::expr::SequenceExpr; use crate::linting::expr_linter::Chunk; use crate::{Lrc, Punctuation, Token, TokenKind, TokenStringExt, patterns::Word}; pub struct Everyday { expr: Box<...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/on_floor.rs
harper-core/src/linting/on_floor.rs
use crate::CharStringExt; use crate::expr::Expr; use crate::expr::LongestMatchOf; use crate::expr::SequenceExpr; use crate::linting::expr_linter::Chunk; use crate::patterns::WordSet; use crate::{ Lrc, Token, TokenStringExt, linting::{ExprLinter, Lint, LintKind, Suggestion}, }; pub struct OnFloor { expr: Bo...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/initialism_linter.rs
harper-core/src/linting/initialism_linter.rs
use crate::expr::Expr; use itertools::Itertools; use crate::{Token, patterns::Word}; use super::{ExprLinter, Lint, LintKind, Suggestion}; use crate::linting::expr_linter::Chunk; /// A struct that can be composed to expand initialisms, respecting the capitalization of each /// item. pub struct InitialismLinter { ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/criteria_phenomena.rs
harper-core/src/linting/criteria_phenomena.rs
use super::Suggestion; use super::expr_linter::ExprLinter; use crate::expr::Expr; use crate::expr::SequenceExpr; use crate::linting::LintKind; use crate::linting::expr_linter::Chunk; use crate::patterns::WordSet; use crate::{Lint, Lrc, Token, TokenStringExt}; /// Linter that checks if 'criteria' or 'phenomena' is used...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/how_to.rs
harper-core/src/linting/how_to.rs
use harper_brill::UPOS; use crate::linting::expr_linter::Chunk; use crate::{ Token, TokenKind, TokenStringExt, expr::{All, Expr, OwnedExprExt, SequenceExpr}, linting::{ExprLinter, Lint, LintKind, Suggestion}, patterns::{InflectionOfBe, UPOSSet}, }; pub struct HowTo { expr: Box<dyn Expr>, } impl D...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/repeated_words.rs
harper-core/src/linting/repeated_words.rs
use super::{Lint, LintKind, Linter, Suggestion}; use crate::TokenStringExt; use crate::char_string::char_string; use crate::{CharString, CharStringExt, Document, Span}; #[derive(Debug, Clone)] pub struct RepeatedWords { /// Words that we need to make sure are detected. /// We use a `Vec` since there aren't a w...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/widely_accepted.rs
harper-core/src/linting/widely_accepted.rs
use crate::expr::Expr; use crate::expr::SequenceExpr; use crate::linting::expr_linter::Chunk; use crate::{ Token, linting::{ExprLinter, Lint, LintKind, Suggestion}, patterns::{Word, WordSet}, }; pub struct WidelyAccepted { expr: SequenceExpr, } impl Default for WidelyAccepted { fn default() -> Sel...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/use_genitive.rs
harper-core/src/linting/use_genitive.rs
use crate::expr::Expr; use crate::expr::FirstMatchOf; use crate::expr::SequenceExpr; use crate::expr::WordExprGroup; use crate::linting::expr_linter::Chunk; use crate::linting::{ExprLinter, LintKind, Suggestion}; use crate::patterns::Word; use crate::{Lint, Lrc, Token}; // Looks for places where the genitive case _isn...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/misspell.rs
harper-core/src/linting/misspell.rs
use crate::linting::expr_linter::Chunk; use crate::{ Token, TokenStringExt, expr::{Expr, SequenceExpr}, linting::{ExprLinter, Lint, LintKind, Suggestion}, patterns::WordSet, }; pub struct Misspell { expr: Box<dyn Expr>, } impl Default for Misspell { fn default() -> Self { let expr = Se...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/use_title_case.rs
harper-core/src/linting/use_title_case.rs
use crate::{Document, TokenStringExt, spell::Dictionary, title_case::try_make_title_case}; use super::{Lint, LintKind, Linter, Suggestion}; pub struct UseTitleCase<D: Dictionary + 'static> { dict: D, } impl<D: Dictionary + 'static> UseTitleCase<D> { pub fn new(dict: D) -> Self { Self { dict } } }...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/correct_number_suffix.rs
harper-core/src/linting/correct_number_suffix.rs
use super::{Lint, LintKind, Linter, Suggestion}; use crate::{Document, OrdinalSuffix, Span, TokenKind}; use crate::{Number, TokenStringExt}; /// Detect incorrect number suffix (e.g. "2st"). #[derive(Debug, Clone, Copy, Default)] pub struct CorrectNumberSuffix; impl Linter for CorrectNumberSuffix { fn lint(&mut se...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/wish_could.rs
harper-core/src/linting/wish_could.rs
use super::{Lint, LintKind, Suggestion}; use crate::Token; use crate::expr::{Expr, SequenceExpr}; use crate::linting::{ExprLinter, expr_linter::Chunk}; pub struct WishCould { expr: Box<dyn Expr>, } impl Default for WishCould { fn default() -> Self { Self { expr: Box::new( S...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/respond.rs
harper-core/src/linting/respond.rs
use std::sync::Arc; use crate::Token; use crate::expr::{Expr, ExprMap, SequenceExpr}; use crate::linting::expr_linter::Chunk; use crate::linting::{ExprLinter, Lint, LintKind, Suggestion}; use crate::patterns::Word; pub struct Respond { expr: Box<dyn Expr>, map: Arc<ExprMap<usize>>, } impl Default for Respond...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/wordpress_dotcom.rs
harper-core/src/linting/wordpress_dotcom.rs
use crate::{CharString, CharStringExt, TokenStringExt}; use super::{Lint, LintKind, Linter, Suggestion}; /// Make sure you properly capitalize `WordPress.com`. #[derive(Default)] pub struct WordPressDotcom; impl Linter for WordPressDotcom { fn lint(&mut self, document: &crate::Document) -> Vec<Lint> { le...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/sought_after.rs
harper-core/src/linting/sought_after.rs
use crate::expr::{Expr, SequenceExpr, SpaceOrHyphen}; use crate::{Token, TokenKind}; use super::{ExprLinter, Lint, LintKind, Suggestion}; use crate::linting::expr_linter::Chunk; pub struct SoughtAfter { expr: Box<dyn Expr>, } impl Default for SoughtAfter { fn default() -> Self { let pattern = Sequenc...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/long_sentences.rs
harper-core/src/linting/long_sentences.rs
use super::{Lint, LintKind, Linter}; use crate::TokenStringExt; use crate::{Document, Span}; /// Detect and warn that the sentence is too long. #[derive(Debug, Clone, Copy, Default)] pub struct LongSentences; impl Linter for LongSentences { fn lint(&mut self, document: &Document) -> Vec<Lint> { let mut ou...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/feel_fell.rs
harper-core/src/linting/feel_fell.rs
use crate::Token; use crate::char_string::CharStringExt; use crate::expr::{Expr, SequenceExpr}; use crate::linting::expr_linter::Chunk; use crate::linting::expr_linter::find_the_only_token_matching; use crate::linting::{ExprLinter, Lint, LintKind, Suggestion}; pub struct FeelFell { expr: Box<dyn Expr>, } impl Def...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/lint.rs
harper-core/src/linting/lint.rs
use std::hash::{DefaultHasher, Hash, Hasher}; use serde::{Deserialize, Serialize}; use crate::{Span, render_markdown::render_markdown}; use super::{LintKind, Suggestion}; /// An error found in text. #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] pub struct Lint { /// The location in the source text ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/expand_time_shorthands.rs
harper-core/src/linting/expand_time_shorthands.rs
use crate::expr::Expr; use crate::expr::SequenceExpr; use crate::expr::SpaceOrHyphen; use std::sync::Arc; use super::{ExprLinter, Lint, LintKind}; use crate::Token; use crate::linting::Suggestion; use crate::linting::expr_linter::Chunk; use crate::patterns::{ImpliesQuantity, WordSet}; pub struct ExpandTimeShorthands ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/most_of_the_times.rs
harper-core/src/linting/most_of_the_times.rs
use crate::expr::{Expr, FixedPhrase, SequenceExpr}; use crate::linting::expr_linter::Chunk; use crate::linting::{ExprLinter, LintKind, Suggestion}; use crate::patterns::Word; use crate::{Lint, Token}; pub struct MostOfTheTimes { expr: Box<dyn Expr>, } impl Default for MostOfTheTimes { fn default() -> Self { ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/and_the_like.rs
harper-core/src/linting/and_the_like.rs
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; use crate::{Lint, Token}; pub struct AndTheLike { expr: Box<dyn Expr>, } impl Default ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/need_to_noun.rs
harper-core/src/linting/need_to_noun.rs
use crate::Token; use crate::char_string::char_string; use crate::expr::Expr; use crate::expr::LongestMatchOf; use crate::expr::OwnedExprExt; use crate::expr::SequenceExpr; use crate::expr::UnlessStep; use crate::patterns::DerivedFrom; use crate::patterns::WordSet; use super::{ExprLinter, Lint, LintKind, Suggestion}; ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/free_predicate.rs
harper-core/src/linting/free_predicate.rs
use std::sync::Arc; use crate::Token; use crate::TokenKind; use crate::char_string::CharStringExt; use crate::expr::{Expr, ExprMap, SequenceExpr}; use crate::patterns::WhitespacePattern; use super::{ExprLinter, Lint, LintKind, Suggestion}; use crate::linting::expr_linter::Chunk; pub struct FreePredicate { expr: ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/win_prize.rs
harper-core/src/linting/win_prize.rs
use crate::expr::SequenceExpr; use crate::expr::{Expr, OwnedExprExt}; use crate::linting::expr_linter::Chunk; use crate::{ Lrc, Token, linting::{ExprLinter, Lint, LintKind, Suggestion}, patterns::WordSet, }; pub struct WinPrize { expr: Box<dyn Expr>, } impl Default for WinPrize { fn default() -> S...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/then_than.rs
harper-core/src/linting/then_than.rs
use super::{ExprLinter, Lint, LintKind}; use crate::expr::{All, Expr, FirstMatchOf, FixedPhrase, SequenceExpr}; use crate::linting::Suggestion; use crate::linting::expr_linter::Chunk; use crate::patterns::{Invert, Word, WordSet}; use crate::{CharStringExt, Token, TokenKind}; /// Corrects the misuse of `then` to `than`...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/after_later.rs
harper-core/src/linting/after_later.rs
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; pub struct AfterLater { expr: Box<dyn Expr>, } impl Default for AfterLater { fn default() ->...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/less_worse.rs
harper-core/src/linting/less_worse.rs
use crate::expr::{Expr, SequenceExpr, SpaceOrHyphen}; use crate::patterns::WordSet; use crate::{CharStringExt, Token, TokenStringExt}; use super::{ExprLinter, Lint, LintKind, Suggestion}; use crate::linting::expr_linter::Chunk; pub struct LessWorse { expr: Box<dyn Expr>, } impl Default for LessWorse { fn def...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/back_in_the_day.rs
harper-core/src/linting/back_in_the_day.rs
use crate::expr::Expr; use crate::expr::FixedPhrase; use crate::expr::OwnedExprExt; use crate::expr::SequenceExpr; use crate::{ Lrc, Token, TokenStringExt, patterns::{Pattern, WordSet}, }; use super::{ExprLinter, Lint, LintKind, Suggestion}; use crate::linting::expr_linter::Chunk; pub struct BackInTheDay { ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/johns_hopkins.rs
harper-core/src/linting/johns_hopkins.rs
use crate::{ CharStringExt, Token, expr::{Expr, SequenceExpr}, linting::expr_linter::Chunk, linting::{ExprLinter, Lint, LintKind, Suggestion}, }; pub struct JohnsHopkins { expr: Box<dyn Expr>, } impl Default for JohnsHopkins { fn default() -> Self { let expr = SequenceExpr::default() ...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/throw_away.rs
harper-core/src/linting/throw_away.rs
use crate::linting::expr_linter::Chunk; use crate::{ Token, expr::{Expr, SequenceExpr}, linting::{ExprLinter, Lint, LintKind, Suggestion}, }; pub struct ThrowAway { expr: Box<dyn Expr>, } impl Default for ThrowAway { fn default() -> Self { let expr = SequenceExpr::default() .t_...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/proper_noun_capitalization_linters.rs
harper-core/src/linting/proper_noun_capitalization_linters.rs
use crate::expr::{Expr, ExprMap, FixedPhrase}; use hashbrown::HashMap; use serde::{Deserialize, Serialize}; use super::{ExprLinter, LintGroup}; use super::{Lint, LintKind, Suggestion}; use crate::Document; use crate::linting::expr_linter::Chunk; use crate::parsers::PlainEnglish; use crate::spell::Dictionary; use crate...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/apart_from.rs
harper-core/src/linting/apart_from.rs
use crate::Token; use crate::expr::{Expr, SequenceExpr}; use crate::linting::expr_linter::Chunk; use super::{ExprLinter, Lint, LintKind, Suggestion}; pub struct ApartFrom { expr: Box<dyn Expr>, } impl Default for ApartFrom { fn default() -> Self { let expr = SequenceExpr::any_capitalization_of("apart...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/some_without_article.rs
harper-core/src/linting/some_without_article.rs
use crate::linting::expr_linter::Chunk; use crate::{ Token, TokenStringExt, expr::{Expr, SequenceExpr}, linting::{ExprLinter, Lint, LintKind, Suggestion}, }; pub struct SomeWithoutArticle { expr: Box<dyn Expr>, } impl Default for SomeWithoutArticle { fn default() -> Self { let expr = Seque...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false
Automattic/harper
https://github.com/Automattic/harper/blob/51e02866aea0eade6a0581792c76cfa2c289cb84/harper-core/src/linting/of_course.rs
harper-core/src/linting/of_course.rs
//! Corrects "of curse/corse" to "of course" while ignoring phrases like "kind of curse". //! //! See also: //! - `OfCourse` in `phrase_corrections` for "off course" / "o course" / "ofcourse" → "of course" corrections. use crate::expr::Expr; use crate::expr::SequenceExpr; use crate::linting::expr_linter::Chunk; use cr...
rust
Apache-2.0
51e02866aea0eade6a0581792c76cfa2c289cb84
2026-01-04T15:46:30.661431Z
false