code: static File getRulesDirectory(MavenProject rootModule, String rulesDirectory) {
          File rules = new File(rulesDirectory);
          return rules.isAbsolute() ? rules : new File(rootModule.getBasedir().getAbsolutePath() + File.separator + rulesDirectory);
      }
docs: Returns the directory containing rules.
  
  @param rootModule     The root module of the project.
  @param rulesDirectory The name of the directory used for identifying the root module.
  @return The file representing the directory.