Package com.sonarsource.rpg.api.checks
Interface CheckContext
-
public interface CheckContext
This interface should be used by checks to get access to the analyzed RPG source code and to create issues.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addIssue(org.sonar.api.rule.RuleKey ruleKey, int lineNumber, String message, Double effortToFix)
Create a line-level issue.void
addIssue(org.sonar.api.rule.RuleKey ruleKey, String message, Double effortToFix)
Create a file-level issue.String
contents()
File
file()
Deprecated.since 2.4 usecontents()
for content,filename()
for filenameString
filename()
ModuleTree
module()
-
-
-
Method Detail
-
file
@Deprecated File file()
Deprecated.since 2.4 usecontents()
for content,filename()
for filename- Returns:
- the current RPG file being analyzed.
-
module
ModuleTree module()
- Returns:
- the current RPG module being analyzed.
-
addIssue
void addIssue(org.sonar.api.rule.RuleKey ruleKey, int lineNumber, String message, @Nullable Double effortToFix)
Create a line-level issue.- Parameters:
ruleKey
- key of the rule which detects an issuelineNumber
- line number on which an issue is detectedmessage
- issue messageeffortToFix
- the factor which should be combined to the linear coefficient when using a "linear" or "linear with offset" remediation function
-
addIssue
void addIssue(org.sonar.api.rule.RuleKey ruleKey, String message, @Nullable Double effortToFix)
Create a file-level issue.- Parameters:
ruleKey
- key of the rule which detects an issuemessage
- issue messageeffortToFix
- the factor which should be combined to the linear coefficient when using a "linear" or "linear with offset" remediation function
-
contents
String contents()
- Returns:
- the current RPG file contents.
-
filename
String filename()
- Returns:
- the current RPG file name.
-
-