Class CheckstyleModuleRunner

java.lang.Object
de.hsh.graja.core.ModuleRunner
de.hsh.graja.modules.checkstyle.CheckstyleModuleRunner

public class CheckstyleModuleRunner extends ModuleRunner
  • Constructor Details

  • Method Details

    • getModuleConfiguration

      public CheckstyleModuleConfiguration getModuleConfiguration()
      Overrides:
      getModuleConfiguration in class ModuleRunner
      Returns:
      the module configuration
    • run

      public ModuleRunnerResult run(ModuleRunnerInput mri, Map<String,ModuleRunnerResult> previousModuleResults)
      Loads the checkstyle configuration, configures checkstyle and runs it on the submission source files.
      Specified by:
      run in class ModuleRunner
      Parameters:
      mri - the input data for the runner
      previousModuleResults - output of previous modules serves as input for this module
      Returns:
      the result of the checkstyle execution, framed by debug information
    • fixWrongConfigurations

      public static List fixWrongConfigurations(CheckstyleConfiguration config) throws com.puppycrawl.tools.checkstyle.api.CheckstyleException
      Fixes wrong checkstyle configurations in context to graja circumstances, e.g. a wrongly configured charset.
      Parameters:
      config - the config that needs to be checked
      Returns:
      a list of comments, containing a comment for each applied fix.
      Throws:
      com.puppycrawl.tools.checkstyle.api.CheckstyleException