github / github/codeql

Java: Some JavadocTag line numbers are wrong

Open
#3,826 0 comments 0 reactions 0 assignees View on GitHub
Java question
Dominant language
CodeQL
Stars
10.1k
Forks
2.1k
Avg merge
2d 15h
Merged PRs (30d)
141

Description

**Description of the issue**
QL reports wrong line numbers for some `JavadocTag`s.
Example query for LGTM demo projects:
```ql
import java

from JavadocTag a, JavadocTag b, Location locA, Location locB
where
a != b
and a.getParent() = b.getParent()
and locA = a.getLocation()
and locB = b.getLocation()
and locA.getStartLine() = locB.getStartLine()
select a, b, a.getText(), b.getText(),
locA.getEndLine(), locB.getEndLine(),
locA.getStartColumn(), locB.getStartColumn(),
locA.getEndColumn(),locB.getEndColumn()
```
[Query console link](https://lgtm.com/query/3568186472631499443/)

Note how these tags should be in the same line, but actually represent tags in different lines.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.