File tree 1 file changed +32
-0
lines changed
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ const FALSE_POSITIVES: &[&str] = &[
9
9
// Different valid constructions.
10
10
"all" ,
11
11
"emblematic" ,
12
+ "equivalent" ,
12
13
"full" ,
13
14
"inside" ,
14
15
// "more" is tricky but it often seems correct and idiomatic.
@@ -21,6 +22,7 @@ const FALSE_POSITIVES: &[&str] = &[
21
22
"bit" ,
22
23
"bottom" ,
23
24
"chance" ,
25
+ "derivative" ,
24
26
"dream" ,
25
27
"front" ,
26
28
"half" ,
@@ -35,6 +37,7 @@ const FALSE_POSITIVES: &[&str] = &[
35
37
"precision" ,
36
38
// for "rid" I removed the `5` flag in `dictionary.dict``
37
39
"shadow" ,
40
+ "side" ,
38
41
"short" ,
39
42
"something" ,
40
43
"sound" ,
@@ -416,4 +419,33 @@ mod tests {
416
419
// Present participles have properties of adjectives, nouns, and verbs
417
420
assert_lint_count ( "That's the beginning of a conversation." , AdjectiveOfA , 0 ) ;
418
421
}
422
+
423
+ #[ test]
424
+ fn dont_flag_side ( ) {
425
+ // Can be an adjective in e.g. "via a side door"
426
+ assert_lint_count (
427
+ "it hit the barrier on the side of a highway" ,
428
+ AdjectiveOfA ,
429
+ 0 ,
430
+ ) ;
431
+ }
432
+
433
+ #[ test]
434
+ fn dont_flag_derivative ( ) {
435
+ // Adj: "a derivative story", Noun: "stocks and derivatives"
436
+ assert_lint_count (
437
+ "Techniques for evaluating the *partial derivative of a function" ,
438
+ AdjectiveOfA ,
439
+ 0 ,
440
+ )
441
+ }
442
+
443
+ #[ test]
444
+ fn dont_flag_equivalent ( ) {
445
+ assert_lint_count (
446
+ "Rust's equivalent of a switch statement is a match expression" ,
447
+ AdjectiveOfA ,
448
+ 0 ,
449
+ ) ;
450
+ }
419
451
}
You can’t perform that action at this time.
0 commit comments