Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

feat(core): create rule to detect duplicate punctuation (#1694)

Elijah Potter50ace25d128b
diff --git a/harper-comments/src/comment_parsers/mod.rs b/harper-comments/src/comment_parsers/mod.rs
index b45723904..81b66e2fb 100644
--- a/harper-comments/src/comment_parsers/mod.rs
+++ b/harper-comments/src/comment_parsers/mod.rs
@@ -34,7 +34,7 @@ fn without_initiators(source: &[char]) -> Span<char> {
}
fn is_comment_character(c: char) -> bool {
- matches!(c, '#' | '-' | '/' | '*' | '!')
+ matches!(c, '#' | '-' | '/' | '*' | '!' | ';')
}
#[cfg(test)]
diff --git a/harper-comments/src/comment_parsers/unit.rs b/harper-comments/src/comment_parsers/unit.rs
index ad25d72e0..38950530e 100644
--- a/harper-comments/src/comment_parsers/unit.rs
+++ b/harper-comments/src/comment_parsers/unit.rs
@@ -4,7 +4,8 @@ use harper_core::{Span, Token};
use super::without_initiators;
-/// A comment parser that strips starting `/` and `*` characters.
+/// A comment parser that strips starting `/` or `*` characters.
+/// See [without_initiators] for a more complete list.
///
/// It is meant to cover _most_ cases in _most_ programming languages.
///
diff --git a/harper-comments/tests/language_support.rs b/harper-comments/tests/language_support.rs
index f5388e381..4a980f6cb 100644
--- a/harper-comments/tests/language_support.rs
+++ b/harper-comments/tests/language_support.rs
@@ -61,7 +61,7 @@ create_test!(ignore_shebang_3.sh, 0);
create_test!(ignore_shebang_4.sh, 1);
create_test!(common.mill, 1);
create_test!(basic_kotlin.kt, 0);
-create_test!(basic.clj, 12);
+create_test!(basic.clj, 8);
// Checks that some comments are masked out
create_test!(ignore_comments.rs, 1);
diff --git a/harper-core/src/linting/lint_group.rs b/harper-core/src/linting/lint_group.rs
index d0529771f..a2bfbc398 100644
--- a/harper-core/src/linting/lint_group.rs
+++ b/harper-core/src/linting/lint_group.rs
@@ -91,6 +91,7 @@ use super::pronoun_contraction::PronounContraction;
use super::pronoun_inflection_be::PronounInflectionBe;
use super::pronoun_knew::PronounKnew;
use super::proper_noun_capitalization_linters;
+use super::punctuation_clusters::PunctuationClusters;
use super::quantifier_needs_of::QuantifierNeedsOf;
use super::redundant_additive_adverbs::RedundantAdditiveAdverbs;
use super::regionalisms::Regionalisms;
@@ -417,6 +418,8 @@ impl LintGroup {
insert_expr_rule!(Cant, true);
insert_struct_rule!(CapitalizePersonalPronouns, true);
insert_expr_rule!(ChockFull, true);
+ insert_struct_rule!(PunctuationClusters, true);
+ insert_struct_rule!(NoFrenchSpaces, true);
insert_struct_rule!(CommaFixes, true);
insert_struct_rule!(CompoundNouns, true);
insert_expr_rule!(Confident, true);
diff --git a/harper-core/src/linting/mod.rs b/harper-core/src/linting/mod.rs
index 6b2c7bbd5..afbffafea 100644
--- a/harper-core/src/linting/mod.rs
+++ b/harper-core/src/linting/mod.rs
@@ -103,6 +103,7 @@ mod pronoun_contraction;
mod pronoun_inflection_be;
mod pronoun_knew;
mod proper_noun_capitalization_linters;
+mod punctuation_clusters;
mod quantifier_needs_of;
mod redundant_additive_adverbs;
mod regionalisms;
@@ -224,6 +225,7 @@ pub use possessive_noun::PossessiveNoun;
pub use possessive_your::PossessiveYour;
pub use pronoun_contraction::PronounContraction;
pub use pronoun_inflection_be::PronounInflectionBe;
+pub use punctuation_clusters::PunctuationClusters;
pub use quantifier_needs_of::QuantifierNeedsOf;
pub use redundant_additive_adverbs::RedundantAdditiveAdverbs;
pub use regionalisms::Regionalisms;
diff --git a/harper-core/src/linting/punctuation_clusters.rs b/harper-core/src/linting/punctuation_clusters.rs
new file mode 100644
index 000000000..f6f094cc5
--- /dev/null
+++ b/harper-core/src/linting/punctuation_clusters.rs
@@ -0,0 +1,274 @@
+use std::collections::BTreeSet;
+
+use crate::{
+ Document, Punctuation, Span, TokenKind,
+ linting::{Lint, LintKind, Linter, Suggestion},
+};
+
+/// Flags clusters of punctuation that should be collapsed to a single mark
+/// (e.g. `!!`, `?!?`, `//`, `.,`, `; :`, etc.).
+#[derive(Debug, Default)]
+pub struct PunctuationClusters;
+
+impl PunctuationClusters {
+ /// Punctuation kinds we’re willing to condense.
+ fn is_candidate(kind: &TokenKind) -> bool {
+ matches!(
+ kind,
+ TokenKind::Punctuation(
+ Punctuation::Comma
+ | Punctuation::Semicolon
+ | Punctuation::Colon
+ | Punctuation::ForwardSlash
+ | Punctuation::Bang
+ | Punctuation::Question
+ | Punctuation::Period
+ | Punctuation::Ampersand
+ )
+ )
+ }
+
+ /// Map a candidate punctuation token to its canonical char.
+ fn char_of(kind: &TokenKind) -> char {
+ match kind {
+ TokenKind::Punctuation(Punctuation::Comma) => ',',
+ TokenKind::Punctuation(Punctuation::Semicolon) => ';',
+ TokenKind::Punctuation(Punctuation::Colon) => ':',
+ TokenKind::Punctuation(Punctuation::ForwardSlash) => '/',
+ TokenKind::Punctuation(Punctuation::Bang) => '!',
+ TokenKind::Punctuation(Punctuation::Question) => '?',
+ TokenKind::Punctuation(Punctuation::Period) => '.',
+ TokenKind::Punctuation(Punctuation::Ampersand) => '&',
+ _ => unreachable!("`char_of` called on non-candidate punctuation"),
+ }
+ }
+}
+
+impl Linter for PunctuationClusters {
+ fn lint(&mut self, document: &Document) -> Vec<Lint> {
+ let toks = document.get_tokens();
+ let mut lints = Vec::new();
+ let mut i = 0;
+ let mut uniq = BTreeSet::<char>::new();
+
+ while i < toks.len() {
+ if !Self::is_candidate(&toks[i].kind) {
+ i += 1;
+ continue;
+ }
+
+ let start = i;
+ let mut last_punct = i; // last index that is a candidate punctuation
+ uniq.clear();
+ uniq.insert(Self::char_of(&toks[i].kind));
+
+ // scan forward, only consuming spaces if they are *between* punctuation
+ let mut j = i + 1;
+ while j < toks.len() {
+ match &toks[j].kind {
+ k if Self::is_candidate(k) => {
+ uniq.insert(Self::char_of(k));
+ last_punct = j;
+ j += 1;
+ }
+ TokenKind::Space(_) | TokenKind::Newline(_) => {
+ // Peek past contiguous whitespace.
+ let mut k = j;
+ while k < toks.len()
+ && matches!(toks[k].kind, TokenKind::Space(_) | TokenKind::Newline(_))
+ {
+ k += 1;
+ }
+ // If whitespace is followed by more punctuation, it's *internal* → consume it.
+ if k < toks.len() && Self::is_candidate(&toks[k].kind) {
+ uniq.insert(Self::char_of(&toks[k].kind));
+ last_punct = k;
+ j = k + 1;
+ } else {
+ // Whitespace is *external* (before a word/newline/end) → stop BEFORE it.
+ break;
+ }
+ }
+ _ => break,
+ }
+ }
+
+ // Count punctuation within the cluster range (no external trailing whitespace).
+ let count = (start..=last_punct)
+ .filter(|idx| Self::is_candidate(&toks[*idx].kind))
+ .count();
+
+ if count >= 2 {
+ let span = Span::new(toks[start].span.start, toks[last_punct].span.end);
+
+ // One suggestion per distinct glyph, external whitespace preserved outside span.
+ let suggestions = uniq
+ .iter()
+ .map(|c| Suggestion::ReplaceWith(vec![*c]))
+ .collect::<Vec<_>>();
+
+ lints.push(Lint {
+ span,
+ lint_kind: LintKind::Formatting,
+ suggestions,
+ message: "Condense this punctuation cluster to a single mark.".into(),
+ priority: 63,
+ });
+
+ i = last_punct + 1;
+ } else {
+ i += 1;
+ }
+ }
+
+ lints
+ }
+
+ fn description(&self) -> &str {
+ "Detects consecutive or mixed punctuation marks that should be reduced \
+ to a single comma, semicolon, colon, slash, question mark, \
+ exclamation mark, period, or ampersand."
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use crate::linting::tests::{assert_suggestion_result, assert_top3_suggestion_result};
+
+ use super::PunctuationClusters;
+
+ #[test]
+ fn flags_double_comma() {
+ assert_suggestion_result(
+ "Wait,, what happened?",
+ PunctuationClusters,
+ "Wait, what happened?",
+ );
+ }
+
+ #[test]
+ fn flags_double_semicolon() {
+ assert_suggestion_result(
+ "He hesitated;; then spoke.",
+ PunctuationClusters,
+ "He hesitated; then spoke.",
+ );
+ }
+
+ #[test]
+ fn flags_double_colon() {
+ assert_suggestion_result("Choices:: A or B.", PunctuationClusters, "Choices: A or B.");
+ }
+
+ #[test]
+ fn flags_double_bang() {
+ assert_suggestion_result("Stop!!", PunctuationClusters, "Stop!");
+ }
+
+ #[test]
+ fn flags_double_question() {
+ assert_suggestion_result("Really??", PunctuationClusters, "Really?");
+ }
+
+ #[test]
+ fn flags_mixed_qbang_pair() {
+ assert_top3_suggestion_result("What?!", PunctuationClusters, "What?");
+ }
+
+ #[test]
+ fn flags_triple_bang() {
+ assert_suggestion_result(
+ "No!!! Absolutely not.",
+ PunctuationClusters,
+ "No! Absolutely not.",
+ );
+ }
+
+ #[test]
+ fn flags_q_bang_bang() {
+ assert_top3_suggestion_result("Really?!!", PunctuationClusters, "Really?");
+ }
+
+ #[test]
+ fn flags_double_slash() {
+ assert_suggestion_result(
+ "This // is a typo.",
+ PunctuationClusters,
+ "This / is a typo.",
+ );
+ }
+
+ #[test]
+ fn flags_triple_question() {
+ assert_suggestion_result("Why???", PunctuationClusters, "Why?");
+ }
+
+ #[test]
+ fn flags_quadruple_bang() {
+ assert_suggestion_result("Stop!!!!", PunctuationClusters, "Stop!");
+ }
+
+ #[test]
+ fn flags_question_bang_question() {
+ assert_top3_suggestion_result("You did what?!?", PunctuationClusters, "You did what?");
+ }
+
+ #[test]
+ fn flags_bang_question_bang() {
+ assert_top3_suggestion_result("No way!?!", PunctuationClusters, "No way!");
+ }
+
+ #[test]
+ fn flags_question_bang_bang_question() {
+ assert_top3_suggestion_result("Seriously?!!?", PunctuationClusters, "Seriously?");
+ }
+
+ #[test]
+ fn flags_with_intervening_whitespace() {
+ assert_top3_suggestion_result("Why?! ?", PunctuationClusters, "Why?");
+ }
+
+ #[test]
+ fn flags_double_ampersand() {
+ assert_suggestion_result("This && that.", PunctuationClusters, "This & that.");
+ }
+
+ #[test]
+ fn flags_period_comma_cluster() {
+ assert_top3_suggestion_result("Oops., excuse me.", PunctuationClusters, "Oops, excuse me.");
+ }
+
+ #[test]
+ fn flags_colon_comma_cluster() {
+ assert_top3_suggestion_result(
+ "Delay:, we must wait.",
+ PunctuationClusters,
+ "Delay: we must wait.",
+ );
+ }
+
+ #[test]
+ fn flags_semicolon_colon_cluster() {
+ assert_top3_suggestion_result("Choices;: A or B.", PunctuationClusters, "Choices: A or B.");
+ }
+
+ #[test]
+ fn flags_comma_period_cluster() {
+ assert_top3_suggestion_result(
+ "Hold on,. actually…",
+ PunctuationClusters,
+ "Hold on, actually…",
+ );
+ }
+
+ #[test]
+ fn flags_question_period_cluster() {
+ assert_top3_suggestion_result("Really?.", PunctuationClusters, "Really?");
+ assert_top3_suggestion_result("Really?.", PunctuationClusters, "Really.");
+ }
+
+ #[test]
+ fn flags_bang_period_cluster() {
+ assert_suggestion_result("Stop!.", PunctuationClusters, "Stop!");
+ }
+}
diff --git a/harper-core/src/span.rs b/harper-core/src/span.rs
index e95e815ba..bffb5e1b1 100644
--- a/harper-core/src/span.rs
+++ b/harper-core/src/span.rs
@@ -105,6 +105,14 @@ impl<T> Span<T> {
}
}
+ /// Return an expanded span by either modifying [`Self::start`] or [`Self::end`] to include the target
+ /// index.
+ pub fn expanded_to_include(&self, target: usize) -> Self {
+ let mut clone = *self;
+ clone.expand_to_include(target);
+ clone
+ }
+
/// Get the associated content. Will panic if any aspect is invalid.
pub fn get_content<'a>(&self, source: &'a [T]) -> &'a [T] {
match self.try_get_content(source) {
diff --git a/harper-core/tests/run_tests.rs b/harper-core/tests/run_tests.rs
index 3dc7ba882..5c2700a8e 100644
--- a/harper-core/tests/run_tests.rs
+++ b/harper-core/tests/run_tests.rs
@@ -92,4 +92,4 @@ create_test!(yogurt_british_clean.md, 0, Dialect::British);
create_test!(lukas_homework.md, 3, Dialect::American);
// Org mode tests
-create_org_test!(index.org, 32, Dialect::American);
+create_org_test!(index.org, 43, Dialect::American);
diff --git a/harper-core/tests/text/linters/Alice's Adventures in Wonderland.snap.yml b/harper-core/tests/text/linters/Alice's Adventures in Wonderland.snap.yml
index 888ad79e1..64ff3c892 100644
--- a/harper-core/tests/text/linters/Alice's Adventures in Wonderland.snap.yml
+++ b/harper-core/tests/text/linters/Alice's Adventures in Wonderland.snap.yml
@@ -405,6 +405,16 @@ Message: |
+Lint: Formatting (63 priority)
+Message: |
+ 204 | > Alice’s Right Foot, Esq., Hearthrug, near the Fender, (with Alice’s love).
+ | ^~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “,”
+ - Replace with: “.”
+
+
+
Lint: Capitalization (31 priority)
Message: |
226 | himself as he came, “Oh! the Duchess, the Duchess! Oh! won’t she be savage if
diff --git a/harper-core/tests/text/linters/Computer science.snap.yml b/harper-core/tests/text/linters/Computer science.snap.yml
index 21ae9879a..cffcc383b 100644
--- a/harper-core/tests/text/linters/Computer science.snap.yml
+++ b/harper-core/tests/text/linters/Computer science.snap.yml
@@ -1002,6 +1002,16 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 394 | Johnson and Frederick P. Brooks Jr., members of the Machine Organization
+ | ^~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “,”
+ - Replace with: “.”
+
+
+
Lint: Spelling (63 priority)
Message: |
401 | mathematical models have been developed for general concurrent computation
diff --git a/harper-core/tests/text/linters/Difficult sentences.snap.yml b/harper-core/tests/text/linters/Difficult sentences.snap.yml
index c7857676f..c0106409d 100644
--- a/harper-core/tests/text/linters/Difficult sentences.snap.yml
+++ b/harper-core/tests/text/linters/Difficult sentences.snap.yml
@@ -16,6 +16,16 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 51 | Be back by ten o'clock!.
+ | ^~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “!”
+ - Replace with: “.”
+
+
+
Lint: Spelling (63 priority)
Message: |
56 | He was protected by his body armour.
diff --git a/harper-core/tests/text/linters/The Great Gatsby.snap.yml b/harper-core/tests/text/linters/The Great Gatsby.snap.yml
index 3c9c6f043..d9dfbeafa 100644
--- a/harper-core/tests/text/linters/The Great Gatsby.snap.yml
+++ b/harper-core/tests/text/linters/The Great Gatsby.snap.yml
@@ -1353,6 +1353,15 @@ Message: |
+Lint: Formatting (63 priority)
+Message: |
+ 1149 | . . . I was standing beside his bed and he was sitting up between the sheets,
+ | ^~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Formatting (63 priority)
Message: |
1152 | “Beauty and the Beast . . . Loneliness . . . Old Grocery Horse . . . Brook’n
@@ -1362,6 +1371,15 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 1152 | “Beauty and the Beast . . . Loneliness . . . Old Grocery Horse . . . Brook’n
+ | ^~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Formatting (63 priority)
Message: |
1152 | “Beauty and the Beast . . . Loneliness . . . Old Grocery Horse . . . Brook’n
@@ -1371,6 +1389,15 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 1152 | “Beauty and the Beast . . . Loneliness . . . Old Grocery Horse . . . Brook’n
+ | ^~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Formatting (63 priority)
Message: |
1152 | “Beauty and the Beast . . . Loneliness . . . Old Grocery Horse . . . Brook’n
@@ -1380,6 +1407,15 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 1152 | “Beauty and the Beast . . . Loneliness . . . Old Grocery Horse . . . Brook’n
+ | ^~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Spelling (63 priority)
Message: |
1152 | “Beauty and the Beast . . . Loneliness . . . Old Grocery Horse . . . Brook’n
@@ -1402,6 +1438,16 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 1152 | “Beauty and the Beast . . . Loneliness . . . Old Grocery Horse . . . Brook’n
+ 1153 | Bridge . . .” Then I was lying half asleep in the cold lower level of the
+ | ^~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Spelling (63 priority)
Message: |
1160 | gardens men and girls came and went like moths among the whisperings and the
@@ -1947,6 +1993,15 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 1612 | “It was . . . simply amazing,” she repeated abstractedly. “But I swore I
+ | ^~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Capitalization (31 priority)
Message: |
1612 | “It was . . . simply amazing,” she repeated abstractedly. “But I swore I
@@ -1956,6 +2011,24 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 1614 | face. “Please come and see me. . . . Phone book. . . . Under the name of Mrs.
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
+Lint: Formatting (63 priority)
+Message: |
+ 1614 | face. “Please come and see me. . . . Phone book. . . . Under the name of Mrs.
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Spelling (63 priority)
Message: |
1615 | Sigourney Howard. . . . My aunt. . . .” She was hurrying off as she talked—her
@@ -1967,6 +2040,43 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 1615 | Sigourney Howard. . . . My aunt. . . .” She was hurrying off as she talked—her
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
+Lint: Formatting (63 priority)
+Message: |
+ 1615 | Sigourney Howard. . . . My aunt. . . .” She was hurrying off as she talked—her
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
+Lint: Formatting (63 priority)
+Message: |
+ 1632 | “All right, in a minute. Tell them I’ll be right there. . . . Good night.”
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
+Lint: Formatting (63 priority)
+Message: |
+ 1637 | in having been among the last to go, as if he had desired it all the time. “Good
+ 1638 | night, old sport. . . . Good night.”
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Spelling (63 priority)
Message: |
1642 | scene. In the ditch beside the road, right side up, but violently shorn of one
@@ -3172,6 +3282,16 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 2082 | “Anything can happen now that we’ve slid over this bridge,” I thought; “anything
+ 2083 | at all. . . .”
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Spelling (63 priority)
Message: |
2091 | “Mr. Carraway, this is my friend Mr. Wolfshiem.”
@@ -3653,6 +3773,15 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 2386 | in for amour at all—and yet there’s something in that voice of hers. . . .
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Spelling (63 priority)
Message: |
2395 | When Jordan Baker had finished telling all this we had left the Plaza for half
@@ -3759,6 +3888,15 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 2603 | “Of course, of course! They’re fine!” and he added hollowly, “. . . old sport.”
+ | ^~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Capitalization (31 priority)
Message: |
2603 | “Of course, of course! They’re fine!” and he added hollowly, “. . . old sport.”
@@ -4020,6 +4158,61 @@ Message: |
+Lint: Formatting (63 priority)
+Message: |
+ 2925 | “Yes. . . . Well, I can’t talk now. . . . I can’t talk now, old sport. . . . I
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
+Lint: Formatting (63 priority)
+Message: |
+ 2925 | “Yes. . . . Well, I can’t talk now. . . . I can’t talk now, old sport. . . . I
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
+Lint: Formatting (63 priority)
+Message: |
+ 2925 | “Yes. . . . Well, I can’t talk now. . . . I can’t talk now, old sport. . . . I
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
+Lint: Formatting (63 priority)
+Message: |
+ 2925 | “Yes. . . . Well, I can’t talk now. . . . I can’t talk now, old sport. . . . I
+ 2926 | said a small town. . . . He must know what a small town is. . . . Well, he’s no
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
+Lint: Formatting (63 priority)
+Message: |
+ 2926 | said a small town. . . . He must know what a small town is. . . . Well, he’s no
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
+Lint: Formatting (63 priority)
+Message: |
+ 2927 | use to us if Detroit is his idea of a small town. . . .” He rang off.
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Spelling (63 priority)
Message: |
2940 | “I know what we'll do,” said Gatsby, “we'll have Klipspringer play the piano.”
@@ -4043,6 +4236,15 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 2950 | I’d been asleep. Then I got up . . .”
+ | ^~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Spelling (63 priority)
Message: |
2952 | “Klipspringer plays the piano,” said Gatsby, cutting him off. “Don’t you, Ewing,
@@ -4357,6 +4559,15 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 3137 | little champagne? Nothing at all, thanks. . . . I’m sorry———
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Enhancement (31 priority)
Message: |
3141 | “Very good roads around here.”
@@ -4423,6 +4634,15 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 3274 | “Mrs. Buchanan . . . and Mr. Buchanan—” After an instant’s hesitation he added:
+ | ^~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Capitalization (31 priority)
Message: |
3274 | “Mrs. Buchanan . . . and Mr. Buchanan—” After an instant’s hesitation he added:
@@ -4432,6 +4652,15 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 3303 | here’s my little gold pencil.” . . . She looked around after a moment and told
+ | ^~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Spelling (63 priority)
Message: |
3316 | “Wha’?”
@@ -4534,6 +4763,25 @@ Message: |
+Lint: Formatting (63 priority)
+Message: |
+ 3465 | a certain starting place and go over it all slowly, he could find out what that
+ 3466 | thing was. . . .
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
+Lint: Formatting (63 priority)
+Message: |
+ 3468 | . . . One autumn night, five years before, they had been walking down the street
+ | ^~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Readability (127 priority)
Message: |
3474 | Out of the corner of his eye Gatsby saw that the blocks of the sidewalks really
@@ -4676,6 +4924,46 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 3565 | “Hot!” said the conductor to familiar faces. “Some weather! . . . Hot! . . .
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “!”
+ - Replace with: “.”
+
+
+
+Lint: Formatting (63 priority)
+Message: |
+ 3565 | “Hot!” said the conductor to familiar faces. “Some weather! . . . Hot! . . .
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “!”
+ - Replace with: “.”
+
+
+
+Lint: Formatting (63 priority)
+Message: |
+ 3566 | Hot! . . . Hot! . . . Is it hot enough for you? Is it hot? Is it . . .?”
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “!”
+ - Replace with: “.”
+
+
+
+Lint: Formatting (63 priority)
+Message: |
+ 3566 | Hot! . . . Hot! . . . Is it hot enough for you? Is it hot? Is it . . .?”
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “!”
+ - Replace with: “.”
+
+
+
Lint: Formatting (63 priority)
Message: |
3566 | Hot! . . . Hot! . . . Is it hot enough for you? Is it hot? Is it . . .?”
@@ -4685,6 +4973,25 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 3566 | Hot! . . . Hot! . . . Is it hot enough for you? Is it hot? Is it . . .?”
+ | ^~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+ - Replace with: “?”
+
+
+
+Lint: Formatting (63 priority)
+Message: |
+ 3572 | . . . Through the hall of the Buchanans’ house blew a faint wind, carrying the
+ | ^~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Spelling (63 priority)
Message: |
3572 | . . . Through the hall of the Buchanans’ house blew a faint wind, carrying the
@@ -4704,6 +5011,15 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 3578 | What he really said was: “Yes . . . Yes . . . I’ll see.”
+ | ^~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Formatting (63 priority)
Message: |
3578 | What he really said was: “Yes . . . Yes . . . I’ll see.”
@@ -4713,6 +5029,15 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 3578 | What he really said was: “Yes . . . Yes . . . I’ll see.”
+ | ^~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Spelling (63 priority)
Message: |
3599 | Gatsby stood in the centre of the crimson carpet and gazed around with
@@ -4724,6 +5049,16 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 3605 | We were silent. The voice in the hall rose high with annoyance: “Very well,
+ 3606 | then, I won’t sell you the car at all. . . . I’m under no obligations to you at
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Formatting (63 priority)
Message: |
3606 | then, I won’t sell you the car at all. . . . I’m under no obligations to you at
@@ -4734,6 +5069,16 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 3606 | then, I won’t sell you the car at all. . . . I’m under no obligations to you at
+ 3607 | all . . . and as for your bothering me about it at lunch time, I won’t stand
+ | ^~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Capitalization (31 priority)
Message: |
3607 | all . . . and as for your bothering me about it at lunch time, I won’t stand
@@ -4765,6 +5110,25 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 3618 | “Mr. Gatsby!” He put out his broad, flat hand with well-concealed dislike. “I’m
+ 3619 | glad to see you, sir. . . . Nick. . . .”
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
+Lint: Formatting (63 priority)
+Message: |
+ 3619 | glad to see you, sir. . . . Nick. . . .”
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Spelling (63 priority)
Message: |
3640 | “Bles-sed pre-cious,” she crooned, holding out her arms. “Come to your own
@@ -4885,6 +5249,27 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 3794 | inexhaustible charm that rose and fell in it, the jingle of it, the cymbals’
+ 3795 | song of it. . . . High in a white palace the king’s daughter, the golden girl. .
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
+Lint: Formatting (63 priority)
+Message: |
+ 3795 | song of it. . . . High in a white palace the king’s daughter, the golden girl. .
+ | ^~~~
+ 3796 | . .
+ | ~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Spelling (63 priority)
Message: |
3809 | “Well, you take my coupé and let me drive your car to town.”
@@ -5117,6 +5502,15 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 4004 | thought, or pretended to think, that we were being very funny . . .
+ | ^~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Miscellaneous (31 priority)
Message: |
4010 | “It’s a swell suite,” whispered Jordan respectfully, and every one laughed.
@@ -5281,6 +5675,26 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 4133 | “Open the whiskey, Tom,” she ordered, ‘‘and I'll make you a mint julep. Then you
+ 4134 | won’t seem so stupid to yourself. . . . Look at the mint!”
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
+Lint: Formatting (63 priority)
+Message: |
+ 4148 | sit back and let Mr. Nobody from Nowhere make love to your wife. Well, if that’s
+ 4149 | the idea you can count me out. . . . Nowadays people begin by sneering at family
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Readability (127 priority)
Message: |
4185 | At this point Jordan and I tried to go, but Tom and Gatsby insisted with
@@ -5314,6 +5728,16 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 4248 | “Not that day I carried you down from the Punch Bowl to keep your shoes dry?”
+ 4249 | There was a husky tenderness in his tone. . . . “Daisy?”
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Spelling (63 priority)
Message: |
4265 | Why—there’re things between Daisy and me that you’ll never know, things that
@@ -5400,6 +5824,16 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 4363 | “Want any of this stuff? Jordan? . . . Nick?”
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+ - Replace with: “?”
+
+
+
Lint: Formatting (63 priority)
Message: |
4373 | “No . . . I just remembered that to-day’s my birthday.”
@@ -5409,6 +5843,15 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 4373 | “No . . . I just remembered that to-day’s my birthday.”
+ | ^~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Spelling (63 priority)
Message: |
4377 | It was seven o’clock when we got into the coupé with him and started for Long
@@ -5808,6 +6251,15 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 4554 | body. “He says he knows the car that did it. . . . It was a yellow car.”
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Spelling (63 priority)
Message: |
4560 | “It’s a blue car, a coupé.”
@@ -5948,6 +6400,16 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 4822 | was in love with me too. She thought I knew a lot because I knew different
+ 4823 | things from her . . . Well, there I was, ’way off my ambitions, getting deeper
+ | ^~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Readability (127 priority)
Message: |
4833 | They had never been closer in their month of love, nor communicated more
@@ -6373,6 +6835,15 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 5204 | where poor ghosts, breathing dreams like air, drifted fortuitously about . . .
+ | ^~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Capitalization (31 priority)
Message: |
5205 | like that ashen, fantastic figure gliding toward him through the amorphous
@@ -6598,6 +7069,15 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 5333 | “This is Slagle speaking . . .”
+ | ^~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Spelling (63 priority)
Message: |
5341 | “Young Parke’s in trouble,” he said rapidly. “They picked him up when he handed
@@ -6629,6 +7109,16 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 5349 | There was a long silence on the other end of the wire, followed by an
+ 5350 | exclamation . . . then a quick squawk as the connection was broken.
+ | ^~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Capitalization (31 priority)
Message: |
5350 | exclamation . . . then a quick squawk as the connection was broken.
@@ -7331,6 +7821,15 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 5783 | them together, and let other people clean up the mess they had made. . . .
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+
Lint: Readability (127 priority)
Message: |
5791 | long as mine. One of the taxi drivers in the village never took a fare past the
@@ -7420,3 +7919,13 @@ Suggest:
+Lint: Formatting (63 priority)
+Message: |
+ 5829 | recedes before us. It eluded us then, but that’s no matter—to-morrow we will run
+ 5830 | faster, stretch out our arms farther. . . . And one fine morning———
+ | ^~~~~~~ Condense this punctuation cluster to a single mark.
+Suggest:
+ - Replace with: “.”
+
+
+