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 Detail

      • 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 issue
        lineNumber - line number on which an issue is detected
        message - issue message
        effortToFix - 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 issue
        message - issue message
        effortToFix - 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.