org.sonar.api.batch.sensor.issue
Interface Issue

All Known Implementing Classes:
DefaultIssue

@Beta
public interface Issue

Represents an issue detected by a Sensor.

Since:
5.0

Nested Class Summary
static class Issue.Severity
           
 
Method Summary
 Issue atLine(int line)
          Line of the issue.
 Double effortToFix()
          Effort to fix the issue.
 Issue effortToFix(Double effortToFix)
          Effort to fix the issue.
 InputPath inputPath()
          The InputPath this issue belongs to.
 Integer line()
          Line of the issue.
 String message()
          Message of the issue.
 Issue message(String message)
          Message of the issue.
 Issue onDir(InputDir inputDir)
          The InputDir the issue belongs to.
 Issue onFile(InputFile file)
          The InputFile the issue belongs to.
 Issue onProject()
          Tell that the issue is global to the project.
 Issue.Severity overridenSeverity()
          Overriden severity.
 Issue overrideSeverity(Issue.Severity severity)
          Override severity of the issue.
 RuleKey ruleKey()
          The RuleKey of this issue.
 Issue ruleKey(RuleKey ruleKey)
          The RuleKey of the issue.
 void save()
          Save the issue.
 

Method Detail

ruleKey

Issue ruleKey(RuleKey ruleKey)
The RuleKey of the issue.


ruleKey

RuleKey ruleKey()
The RuleKey of this issue.


onFile

Issue onFile(InputFile file)
The InputFile the issue belongs to. For global issues call onProject().


onDir

Issue onDir(InputDir inputDir)
The InputDir the issue belongs to. For global issues call onProject().


onProject

Issue onProject()
Tell that the issue is global to the project.


inputPath

@CheckForNull
InputPath inputPath()
The InputPath this issue belongs to. Returns null if issue is global to the project.


atLine

Issue atLine(int line)
Line of the issue. Only available for onFile(InputFile) issues. If no line is specified it means that issue is global to the file.


line

@CheckForNull
Integer line()
Line of the issue. Null for global issues and issues on directories. Can also be null for files (issue global to the file).


effortToFix

Issue effortToFix(@Nullable
                  Double effortToFix)
Effort to fix the issue.


effortToFix

@CheckForNull
Double effortToFix()
Effort to fix the issue. Used by technical debt model.


message

Issue message(String message)
Message of the issue.


message

@CheckForNull
String message()
Message of the issue.


overrideSeverity

Issue overrideSeverity(@Nullable
                       Issue.Severity severity)
Override severity of the issue. Setting a null value or not calling this method means to use severity configured in quality profile.


overridenSeverity

@CheckForNull
Issue.Severity overridenSeverity()
Overriden severity.


save

void save()
Save the issue. If rule key is unknow or rule not enabled in the current quality profile then a warning is logged but no exception is thrown.



Copyright © 2009–2015 SonarSource. All rights reserved.