Package org.sonar.api.batch.sensor.issue
Interface NewIssueLocation
-
public interface NewIssueLocation
Represents one issue location. SeeNewIssue.newLocation()
.- Since:
- 5.2
-
-
Field Summary
Fields Modifier and Type Field Description static int
MESSAGE_MAX_SIZE
Maximum number of characters in the message.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NewIssueLocation
at(TextRange location)
Position in the file.NewIssueLocation
message(java.lang.String message)
Optional, but recommended, plain-text message for this location.NewIssueLocation
message(java.lang.String message, java.util.List<NewMessageFormatting> newMessageFormatting)
Optional, message that can be formatted on the frontend.
Formats like Markdown or HTML are not supported.NewMessageFormatting
newMessageFormatting()
Creates new instance of NewMessageFormattingNewIssueLocation
on(InputComponent component)
TheInputComponent
the issue location belongs to.
-
-
-
Field Detail
-
MESSAGE_MAX_SIZE
static final int MESSAGE_MAX_SIZE
Maximum number of characters in the message.- See Also:
- Constant Field Values
-
-
Method Detail
-
on
NewIssueLocation on(InputComponent component)
TheInputComponent
the issue location belongs to. Mandatory.
-
at
NewIssueLocation at(TextRange location)
Position in the file. Only applicable whenon(InputComponent)
has been called with an InputFile. SeeInputFile.newRange(org.sonar.api.batch.fs.TextPointer, org.sonar.api.batch.fs.TextPointer)
-
message
NewIssueLocation message(java.lang.String message)
Optional, but recommended, plain-text message for this location.
Formats like Markdown or HTML are not supported. Size must not be greater thanMESSAGE_MAX_SIZE
characters.
-
message
NewIssueLocation message(java.lang.String message, java.util.List<NewMessageFormatting> newMessageFormatting)
Optional, message that can be formatted on the frontend.
Formats like Markdown or HTML are not supported. Size must not be greater thanMESSAGE_MAX_SIZE
characters.
throwsIllegalArgumentException
if any of theNewMessageFormatting
instances passed in thenewMessageFormatting
is that:
- start is lesser than 0
- end is lesser than start
- end is greater than the size ofmessage
- Since:
- 9.13
-
newMessageFormatting
NewMessageFormatting newMessageFormatting()
Creates new instance of NewMessageFormatting- Returns:
- builder for NewMessageFormatting
- Since:
- 9.13
-
-