@@ -12,6 +12,16 @@ abstract class NotDistinctIdentifierSharedQuery extends Query { }
12
12
13
13
Query getQuery ( ) { result instanceof NotDistinctIdentifierSharedQuery }
14
14
15
+ bindingset [ d, d2]
16
+ pragma [ inline_late]
17
+ private predicate after ( ExternalIdentifiers d , ExternalIdentifiers d2 ) {
18
+ exists ( int dStartLine , int d2StartLine |
19
+ d .getLocation ( ) .hasLocationInfo ( _, dStartLine , _, _, _) and
20
+ d2 .getLocation ( ) .hasLocationInfo ( _, d2StartLine , _, _, _) and
21
+ dStartLine >= d2StartLine
22
+ )
23
+ }
24
+
15
25
query predicate problems (
16
26
ExternalIdentifiers d , string message , ExternalIdentifiers d2 , string nameplaceholder
17
27
) {
@@ -20,10 +30,10 @@ query predicate problems(
20
30
d .getName ( ) .length ( ) >= 31 and
21
31
d2 .getName ( ) .length ( ) >= 31 and
22
32
not d = d2 and
23
- d .getLocation ( ) .getStartLine ( ) >= d2 .getLocation ( ) .getStartLine ( ) and
24
33
d .getSignificantName ( ) = d2 .getSignificantName ( ) and
25
34
not d .getName ( ) = d2 .getName ( ) and
26
35
nameplaceholder = d2 .getName ( ) and
36
+ after ( d , d2 ) and
27
37
message =
28
38
"External identifer " + d .getName ( ) +
29
39
" is nondistinct in characters at or over 31 limit, compared to $@"
0 commit comments