Externalissue: Do not assume endColumn if start column is given


(Andre Pany) #1

In case a start column is given, the logic is also expecting the fields endLine and endColumn to be filled.

…this causes a null pointer excepetion.
I want to pass only the fields startLine and startColumn.

Current workaround is to pass startLine only.


(G Ann Campbell) #2

Hi,

What’s your use case for specifying a start column without an end column? Where do you expect the issue highlighting to end?

 
Ann


(Andre Pany) #3

Hi Ann,

I try to get the D-Scanner (The syntax checker of the D Programming Language) working with the
ExternalIssue functionality. D-Scanner knows the line and the column where an error occurs.

Example: There is a check whether a line exceeds 120 characters.

{
“key”: “dscanner.style.long_line”,
“fileName”: “.\runtime\source\abc\runtime\internal\api.d”,
“line”: 33,
“column”: 121,
“message”: “Line is longer than 120 characters”
}

From D-Scanner a marker is provided (line 33, column 121). From you I understand now,
SonarQube is expecting a range. Can SonarQube cannot handle markers (start line, start column) ?

How the UI could look like for markers I am not really sure.

Kind regards
André


(G Ann Campbell) #4

Hi,

The highlighting choices are the whole line or a subset (range) of the line. So no, it won’t work with just a start column. The idea for the range is to tell the user “the problem is in this particular call, assignment, …”. The fallback if you don’t have a range is the whole line, so the users has to do a little more work to find the problem.

 
HTH,
Ann


(Andre Pany) #5

Hi Ann,

thanks for clarification. This solves my issue.

Kind regards
André