Skip to content

Commit

Permalink
Merge pull request #93 from knewbury01/knewbury01/fix-RULE-5-1
Browse files Browse the repository at this point in the history
Declarations 1and2: patch shared query alert format
  • Loading branch information
jsinglet authored Sep 29, 2022
2 parents 970ca32 + 3779da9 commit 6437440
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
| test.c:2:5:2:36 | iltiqzxgfqsgigwfuyntzghvzltueeeB | test.c:1:5:1:36 | iltiqzxgfqsgigwfuyntzghvzltueeeA | External identifer iltiqzxgfqsgigwfuyntzghvzltueeeB is nondistinct in characters at or over 31 limit, compared to iltiqzxgfqsgigwfuyntzghvzltueeeA |
| test.c:5:5:5:35 | iltiqzxgfqsgigwfuyntzghvzltueea | test.c:4:5:4:36 | iltiqzxgfqsgigwfuyntzghvzltueeaZ | External identifer iltiqzxgfqsgigwfuyntzghvzltueea is nondistinct in characters at or over 31 limit, compared to iltiqzxgfqsgigwfuyntzghvzltueeaZ |
| test.c:8:5:8:35 | iltiqzxgfqsgigwfuyntzghvzltueee | test.c:1:5:1:36 | iltiqzxgfqsgigwfuyntzghvzltueeeA | External identifer iltiqzxgfqsgigwfuyntzghvzltueee is nondistinct in characters at or over 31 limit, compared to iltiqzxgfqsgigwfuyntzghvzltueeeA |
| test.c:8:5:8:35 | iltiqzxgfqsgigwfuyntzghvzltueee | test.c:2:5:2:36 | iltiqzxgfqsgigwfuyntzghvzltueeeB | External identifer iltiqzxgfqsgigwfuyntzghvzltueee is nondistinct in characters at or over 31 limit, compared to iltiqzxgfqsgigwfuyntzghvzltueeeB |
| test.c:2:5:2:36 | iltiqzxgfqsgigwfuyntzghvzltueeeB | External identifer iltiqzxgfqsgigwfuyntzghvzltueeeB is nondistinct in characters at or over 31 limit, compared to $@ | test.c:1:5:1:36 | iltiqzxgfqsgigwfuyntzghvzltueeeA | iltiqzxgfqsgigwfuyntzghvzltueeeA |
| test.c:5:5:5:35 | iltiqzxgfqsgigwfuyntzghvzltueea | External identifer iltiqzxgfqsgigwfuyntzghvzltueea is nondistinct in characters at or over 31 limit, compared to $@ | test.c:4:5:4:36 | iltiqzxgfqsgigwfuyntzghvzltueeaZ | iltiqzxgfqsgigwfuyntzghvzltueeaZ |
| test.c:8:5:8:35 | iltiqzxgfqsgigwfuyntzghvzltueee | External identifer iltiqzxgfqsgigwfuyntzghvzltueee is nondistinct in characters at or over 31 limit, compared to $@ | test.c:1:5:1:36 | iltiqzxgfqsgigwfuyntzghvzltueeeA | iltiqzxgfqsgigwfuyntzghvzltueeeA |
| test.c:8:5:8:35 | iltiqzxgfqsgigwfuyntzghvzltueee | External identifer iltiqzxgfqsgigwfuyntzghvzltueee is nondistinct in characters at or over 31 limit, compared to $@ | test.c:2:5:2:36 | iltiqzxgfqsgigwfuyntzghvzltueeeB | iltiqzxgfqsgigwfuyntzghvzltueeeB |
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,17 @@ abstract class NotDistinctIdentifierSharedQuery extends Query { }

Query getQuery() { result instanceof NotDistinctIdentifierSharedQuery }

query predicate problems(ExternalIdentifiers d, ExternalIdentifiers d2, string message) {
not isExcluded(d, getQuery()) and
query predicate problems(
ExternalIdentifiers d, string message, ExternalIdentifiers d2, string nameplaceholder
) {
not isExcluded(d, getQuery()) and
not isExcluded(d2, getQuery()) and
not d = d2 and
d.getLocation().getStartLine() >= d2.getLocation().getStartLine() and
d.getSignificantName() = d2.getSignificantName() and
not d.getName() = d2.getName() and
nameplaceholder = d2.getName() and
message =
"External identifer " + d.getName() +
" is nondistinct in characters at or over 31 limit, compared to " + d2.getName()
" is nondistinct in characters at or over 31 limit, compared to $@"
}

0 comments on commit 6437440

Please sign in to comment.