diff --git a/src/builder/java/net/kemitix/checkstyle/ruleset/builder/CheckstyleRulesetBuilderApplication.java b/src/builder/java/net/kemitix/checkstyle/ruleset/builder/CheckstyleRulesetBuilderApplication.java new file mode 100644 index 0000000..4052038 --- /dev/null +++ b/src/builder/java/net/kemitix/checkstyle/ruleset/builder/CheckstyleRulesetBuilderApplication.java @@ -0,0 +1,22 @@ +package net.kemitix.checkstyle.ruleset.builder; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * Creates the checkstyle ruleset files. + * + *
This application is intended to only to be used by the developer to create the actual checkstyle xml files that + * this module provides.
+ * + * @author Paul Campbell (pcampbell@kemitix.net) + */ +@Slf4j +@SpringBootApplication +public class CheckstyleRulesetBuilderApplication { + + public static void main(final String[] args) { + SpringApplication.run(CheckstyleRulesetBuilderApplication.class, args); + } +} diff --git a/src/builder/java/net/kemitix/checkstyle/ruleset/builder/OutputProperties.java b/src/builder/java/net/kemitix/checkstyle/ruleset/builder/OutputProperties.java new file mode 100644 index 0000000..dffb53f --- /dev/null +++ b/src/builder/java/net/kemitix/checkstyle/ruleset/builder/OutputProperties.java @@ -0,0 +1,52 @@ +package net.kemitix.checkstyle.ruleset.builder; + +import lombok.Getter; +import lombok.Setter; +import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +import java.io.File; + +/** + * Properties defining the output files. + * + * @author Paul Campbell (pcampbell@kemitix.net) + */ +@Slf4j +@Setter +@Getter +@Configuration +@ConfigurationProperties(prefix = "output") +class OutputProperties { + + /** + * The directory to create the output files in. + */ + private File directory; + + /** + * The name of the level 1 ruleset file. + */ + private String level1; + + /** + * The name of the level 2 ruleset file. + */ + private String level2; + + /** + * The name of the level 3 ruleset file. + */ + private String level3; + + /** + * The name of the level 4 ruleset file. + */ + private String level4; + + /** + * The name of the level 5 ruleset file. + */ + private String level5; +} diff --git a/src/builder/java/net/kemitix/checkstyle/ruleset/builder/Rule.java b/src/builder/java/net/kemitix/checkstyle/ruleset/builder/Rule.java new file mode 100644 index 0000000..810e906 --- /dev/null +++ b/src/builder/java/net/kemitix/checkstyle/ruleset/builder/Rule.java @@ -0,0 +1,38 @@ +package net.kemitix.checkstyle.ruleset.builder; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; + +import java.net.URI; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * . + * + * @author Paul Campbell (paul.campbell@hubio.com) + */ +@ToString +@Setter +@Getter +class Rule { + + private String name; + + private RuleParent parent; + + private RuleLevel level; + + private boolean enabled; + + private RuleSource source; + + private URI uri; + + private Map