@@ -721,6 +721,24 @@ pub fn lint_group() -> LintGroup {
721
721
"Retain `monumentous` for jocular effect. Otherwise `momentous` indicates great signifcance while `monumental` indicates imposing size." ,
722
722
"Advises using `momentous` or `monumental` instead of `monumentous` for serious usage."
723
723
) ,
724
+ "ExplanationMark" => (
725
+ [ "explanation mark" ] ,
726
+ [ "exclamation mark" ] ,
727
+ "The correct name for the `!` punctuation is `exclamation mark`." ,
728
+ "Corrects the eggcorn `explanation mark` to `exclamation mark`."
729
+ ) ,
730
+ "ExplanationMarks" => (
731
+ [ "explanation marks" ] ,
732
+ [ "exclamation marks" ] ,
733
+ "The correct name for the `!` punctuation is `exclamation mark`." ,
734
+ "Corrects the eggcorn `explanation mark` to `exclamation mark`."
735
+ ) ,
736
+ "ExplanationPoint" => (
737
+ [ "explanation point" ] ,
738
+ [ "exclamation point" ] ,
739
+ "The correct name for the `!` punctuation is `exclamation point`." ,
740
+ "Corrects the eggcorn `explanation point` to `exclamation point`."
741
+ ) ,
724
742
"AsFarBackAs" => (
725
743
[ "as early back as" ] ,
726
744
[ "as far back as" ] ,
@@ -1203,6 +1221,48 @@ mod tests {
1203
1221
) ;
1204
1222
}
1205
1223
1224
+ #[ test]
1225
+ fn detect_explanation_mark_atomic ( ) {
1226
+ assert_suggestion_result ( "explanation mark" , lint_group ( ) , "exclamation mark" ) ;
1227
+ }
1228
+
1229
+ #[ test]
1230
+ fn detect_explanation_marks_atomic ( ) {
1231
+ assert_suggestion_result ( "explanation marks" , lint_group ( ) , "exclamation marks" ) ;
1232
+ }
1233
+
1234
+ #[ test]
1235
+ fn detect_explanation_mark_real_world ( ) {
1236
+ assert_suggestion_result (
1237
+ "Note that circled explanation mark, question mark, plus and arrows may be significantly harder to distinguish than their uncircled variants." ,
1238
+ lint_group ( ) ,
1239
+ "Note that circled exclamation mark, question mark, plus and arrows may be significantly harder to distinguish than their uncircled variants." ,
1240
+ ) ;
1241
+ }
1242
+
1243
+ #[ test]
1244
+ fn detect_explanation_marks_real_world ( ) {
1245
+ assert_suggestion_result (
1246
+ "this issue: html: properly handle explanation marks in comments" ,
1247
+ lint_group ( ) ,
1248
+ "this issue: html: properly handle exclamation marks in comments" ,
1249
+ ) ;
1250
+ }
1251
+
1252
+ #[ test]
1253
+ fn detect_explanation_point_atomic ( ) {
1254
+ assert_suggestion_result ( "explanation point" , lint_group ( ) , "exclamation point" ) ;
1255
+ }
1256
+
1257
+ #[ test]
1258
+ fn detect_explanation_point_real_world ( ) {
1259
+ assert_suggestion_result (
1260
+ "js and makes an offhand mention that you can disable inbuilt plugin with an explanation point (e.g. !error )." ,
1261
+ lint_group ( ) ,
1262
+ "js and makes an offhand mention that you can disable inbuilt plugin with an exclamation point (e.g. !error )." ,
1263
+ ) ;
1264
+ }
1265
+
1206
1266
#[ test]
1207
1267
fn detect_as_early_back_as ( ) {
1208
1268
assert_suggestion_result ( "as early back as" , lint_group ( ) , "as far back as" ) ;
0 commit comments