diff --git a/.github/workflows/checkstyle.yml b/.github/workflows/checkstyle.yml index d426e5d..282fa70 100644 --- a/.github/workflows/checkstyle.yml +++ b/.github/workflows/checkstyle.yml @@ -12,3 +12,5 @@ jobs: with: github_token: ${{ secrets.github_token }} reporter: github-pr-review + checkstyle_config: ./properties_file/test_checks.xml + properties_file: ./properties_file/additional.properties diff --git a/properties_file/additional.properties b/properties_file/additional.properties new file mode 100644 index 0000000..b34c30b --- /dev/null +++ b/properties_file/additional.properties @@ -0,0 +1 @@ +max-line-length=50 diff --git a/properties_file/test_checks.xml b/properties_file/test_checks.xml new file mode 100644 index 0000000..b355495 --- /dev/null +++ b/properties_file/test_checks.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/src/main/Application.java b/src/main/Application.java new file mode 100644 index 0000000..781205b --- /dev/null +++ b/src/main/Application.java @@ -0,0 +1,45 @@ +import java.util.Arrays; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.Bean; + +@SpringBootApplication +public class Application { + + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } + + private void DoReallyNothing() { + try { + var counter = 100; + + } catch (Exception e) { + + } + } + + /** + * some java doc. + * + * @param ctx application contexxt + * @return some return + */ + @Bean + public CommandLineRunner commandLineRunner(ApplicationContext ctx) { + return args -> { + System.out.println("Let's inspect the beans provided by Spring Boot:"); + + var LongString = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Porta lorem"; + + String[] beanNames = ctx.getBeanDefinitionNames(); + Arrays.sort(beanNames); + for (String beanName : beanNames) { + System.out.println(beanName); + } + }; + } + +}