Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
bf20d79
feat(core): `HelloGreeting`
elijah-potter Oct 23, 2025
178a8aa
fix(core): `to any` causing false-positives
elijah-potter Oct 23, 2025
80da02a
feat(core): `Alongside`
elijah-potter Oct 23, 2025
36040f7
feat(core): `CompoundSubjectI`
elijah-potter Oct 23, 2025
c7cf843
feat(core): `EggYolk`
elijah-potter Oct 23, 2025
491b0e9
feat(core): `Theres` + `just format`
elijah-potter Oct 24, 2025
35b43cb
feat(core): extend `AllOfASudden`
elijah-potter Oct 24, 2025
4450524
Merge branch 'master' into new-rules
elijah-potter Oct 27, 2025
a316521
feat(core): `Bought`
elijah-potter Oct 28, 2025
d7e775e
feat(core): `BeAllowed`
elijah-potter Oct 28, 2025
a512a41
feat(core): `PronounAre`
elijah-potter Oct 28, 2025
d9e2c00
fix(core): remove `all of the sudden` as a suggestion
elijah-potter Oct 29, 2025
ada0e8f
fix(core): remove bad test
elijah-potter Oct 29, 2025
695a183
feat(core): `DoubleClick`
elijah-potter Oct 29, 2025
539583f
feat(core): `SafeToSave`
elijah-potter Oct 29, 2025
3ebcf9f
feat(core): `FreePredicate`
elijah-potter Oct 29, 2025
149f6d1
feat(core): `ModelSeem`
elijah-potter Oct 30, 2025
715e6cf
fix(core): appease Clippy
elijah-potter Oct 30, 2025
3c29844
fix(core): remove dead code
elijah-potter Oct 30, 2025
9acb5a1
refactor(core): move OrthFlags constructor to globally accessible loc…
elijah-potter Oct 30, 2025
ce3f55d
feat(core): `OrthographicConsistency` can handle ALLCAPS
elijah-potter Oct 30, 2025
b0a6bf6
feat(core): cover other common cases
elijah-potter Oct 30, 2025
2717d1e
feat(core): even more common cases
elijah-potter Oct 30, 2025
cc50021
fix(core): bad imports
elijah-potter Oct 30, 2025
12d53e0
fix(core): remove `dbg` statements
elijah-potter Oct 30, 2025
73ea6ec
fix(core): more cases
elijah-potter Oct 30, 2025
a8073b9
fix(core): broken tests
elijah-potter Oct 31, 2025
b952229
Merge branch 'master' into new-rules
elijah-potter Oct 31, 2025
b479dca
Merge branch 'master' into new-rules
elijah-potter Nov 3, 2025
86c0f2e
Merge branch 'master' into new-rules
elijah-potter Nov 5, 2025
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: 1 addition & 2 deletions harper-comments/tests/language_support_sources/clean.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ contract TestContract {
* @notice This is another test function.
* @dev It has another [link](https://example.com) embedded inside
* @param p This is a parameter
* @return fooBar The return value.
*/
function testFunction2(uint256 p) external returns (address fooBar) {}
function testFunction2(uint256 p) external {}

// This is some gibberish to try to trigger a lint for sentences that continue for too long
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class TestClass {

/**
* This is a Javadoc without any of the fancy frills that come with it.
* This is a JavaDoc without any of the fancy frills that come with it.
*/
public static void main(String[] args) {
System.out.println("Hello world.");
Expand Down
3 changes: 0 additions & 3 deletions harper-core/dictionary.dict
Original file line number Diff line number Diff line change
Expand Up @@ -28667,7 +28667,6 @@ howsoever/
hoyden/NgSJV
hoydenish/J
hp/~N
hr/~NS
ht/~N
huarache/NSg
hub/~NOSg
Expand Down Expand Up @@ -33014,7 +33013,6 @@ marital/~JY
maritime/~J
marjoram/Ng
mark/~NgSVdGr
markdown/NgS
marked/~JVtTU
markedly/~R
marker/~NgSV
Expand Down Expand Up @@ -52984,7 +52982,6 @@ JWT/Ng # JSON Web Token
Jacoco/Sg
JavaDoc/Sg
JavaScript/ONSg # programming language
Javadoc/Sg
JetBrains
Jetpack/Og
Jira/Og # issue tracker
Expand Down
1 change: 1 addition & 0 deletions harper-core/proper_noun_rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@
"Las Vegas",
"Los Angeles",
"New York",
"New York City",
"Niagara Falls",
"Novi Sad",
"Panama Canal",
Expand Down
8 changes: 8 additions & 0 deletions harper-core/src/char_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pub trait CharExt {
///
/// Checks whether the character is in the set (A, E, I, O, U); case-insensitive.
fn is_vowel(&self) -> bool;
fn normalized(self) -> Self;
}

impl CharExt for char {
Expand All @@ -27,6 +28,13 @@ impl CharExt for char {
&& self.script() == Script::Latin
}

fn normalized(self) -> Self {
match self {
'’' | '‘' | 'ʼ' | ''' => '\'',
_ => self,
}
}

fn is_emoji(&self) -> bool {
let Some(block) = unicode_blocks::find_unicode_block(*self) else {
return false;
Expand Down
14 changes: 3 additions & 11 deletions harper-core/src/char_string.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::char_ext::CharExt;
use std::borrow::Cow;

use smallvec::SmallVec;
Expand Down Expand Up @@ -58,12 +59,12 @@ impl CharStringExt for [char] {
/// Convert a given character sequence to the standard character set
/// the dictionary is in.
fn normalized(&'_ self) -> Cow<'_, [char]> {
if self.as_ref().iter().any(|c| char_to_normalized(*c) != *c) {
if self.as_ref().iter().any(|c| c.normalized() != *c) {
Cow::Owned(
self.as_ref()
.iter()
.copied()
.map(char_to_normalized)
.map(|c| c.normalized())
.collect(),
)
} else {
Expand Down Expand Up @@ -120,15 +121,6 @@ impl CharStringExt for [char] {
}
}

fn char_to_normalized(c: char) -> char {
match c {
'’' => '\'',
'‘' => '\'',
''' => '\'',
_ => c,
}
}

macro_rules! char_string {
($string:literal) => {{
use crate::char_string::CharString;
Expand Down
Loading
Loading