File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
harper-core/src/linting/phrase_corrections Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -866,6 +866,13 @@ pub fn lint_group() -> LintGroup {
866866 "Corrects `piece of mind` to `peace of mind`." ,
867867 LintKind :: Eggcorn
868868 ) ,
869+ "PerSe" => (
870+ [ "per say" , "per-se" , "per-say" ] ,
871+ [ "per se" ] ,
872+ "The correct spelling is `per se` (with no hyphen)" ,
873+ "Corrects common misspellings of `per se`." ,
874+ LintKind :: Spelling
875+ ) ,
869876 "PointsOfView" => (
870877 [ "point of views" ] ,
871878 [ "points of view" ] ,
Original file line number Diff line number Diff line change @@ -1444,6 +1444,34 @@ fn corrects_piece_of_mind() {
14441444 )
14451445}
14461446
1447+ // PerSe
1448+ #[ test]
1449+ fn corrects_per_se_hyphenated ( ) {
1450+ assert_suggestion_result (
1451+ "It's not a problem per-se, but it would make the desktop more consistent when using QT and KDE apps." ,
1452+ lint_group ( ) ,
1453+ "It's not a problem per se, but it would make the desktop more consistent when using QT and KDE apps." ,
1454+ )
1455+ }
1456+
1457+ #[ test]
1458+ fn corrects_per_say ( ) {
1459+ assert_suggestion_result (
1460+ "Hi all - not really an issue per say, but more of a request for some suggestions and guidance." ,
1461+ lint_group ( ) ,
1462+ "Hi all - not really an issue per se, but more of a request for some suggestions and guidance." ,
1463+ ) ;
1464+ }
1465+
1466+ #[ test]
1467+ fn corrects_per_say_hyphenated ( ) {
1468+ assert_suggestion_result (
1469+ "Whilst I don't think this is wrong per-say, I'm not confident it is necessary." ,
1470+ lint_group ( ) ,
1471+ "Whilst I don't think this is wrong per se, I'm not confident it is necessary." ,
1472+ ) ;
1473+ }
1474+
14471475// PointsOfView
14481476#[ test]
14491477fn corrects_points_of_view ( ) {
You can’t perform that action at this time.
0 commit comments