builder:Application: remove rule lister

This commit is contained in:
Paul Campbell 2017-01-05 06:59:07 +00:00
parent f57fcfe3f6
commit 23d1a49592

View file

@ -1,10 +1,8 @@
package net.kemitix.checkstyle.ruleset.builder; package net.kemitix.checkstyle.ruleset.builder;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
/** /**
* Creates the checkstyle ruleset files. * Creates the checkstyle ruleset files.
@ -21,13 +19,4 @@ public class CheckstyleRulesetBuilderApplication {
public static void main(final String[] args) { public static void main(final String[] args) {
SpringApplication.run(CheckstyleRulesetBuilderApplication.class, args); SpringApplication.run(CheckstyleRulesetBuilderApplication.class, args);
} }
@Bean
public CommandLineRunner listRules(final RulesProperties rulesProperties) {
return args -> rulesProperties.getRules()
.stream()
.map(Rule::getName)
.map(name -> String.format("- %s", name))
.forEach(System.out::println);
}
} }