Skip to content

Commit

Permalink
Merge pull request #19 from Sehee-Lee-01/feat#11-codestyle
Browse files Browse the repository at this point in the history
🚀 프로젝트에 checkstyle(lint)과 code style(formatter) 설정
  • Loading branch information
Sehee-Lee-01 authored Dec 22, 2023
2 parents ccb1ab6 + 95dd3f2 commit 4e8c971
Show file tree
Hide file tree
Showing 9 changed files with 520 additions and 5 deletions.
58 changes: 58 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
id 'io.spring.dependency-management' version '1.1.4'
id 'java'
id 'jacoco'
id 'checkstyle'
}

group = 'com.backendoori'
Expand Down Expand Up @@ -82,6 +83,14 @@ jacocoTestCoverageVerification {
}
}
}

dependsOn jacocoTestReport
}

checkstyle {
toolVersion = "10.12.5"
configFile = file("${rootDir}/config/checkstyle/checkstyle.xml")
configProperties = [
"org.checkstyle.google.suppressionfilter.config" : "suppressions.xml",
"org.checkstyle.google.suppressionxpathfilter.config": "suppressions.xml"
]
}
365 changes: 365 additions & 0 deletions config/checkstyle/checkstyle.xml

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions config/checkstyle/configuration_1_3.dtd
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<!-- Add the following to any file that is to be validated against this DTD:

<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
-->

<!ELEMENT module (module|property|metadata|message)*>
<!ATTLIST module name NMTOKEN #REQUIRED>

<!ELEMENT property EMPTY>
<!ATTLIST property
name NMTOKEN #REQUIRED
value CDATA #REQUIRED
default CDATA #IMPLIED
>

<!--

Used to store metadata in the Checkstyle configuration file. This
information is ignored by Checkstyle. This may be useful if you want to
store plug-in specific information.

To avoid name clashes between different tools/plug-ins you are *strongly*
encouraged to prefix all names with your domain name. For example, use the
name "com.mycompany.parameter" instead of "parameter".

The prefix "com.puppycrawl." is reserved for Checkstyle.

-->

<!ELEMENT metadata EMPTY>
<!ATTLIST metadata
name NMTOKEN #REQUIRED
value CDATA #REQUIRED
>

<!--
Can be used to replace some generic Checkstyle messages with a custom
messages.

The 'key' attribute specifies for which actual Checkstyle message the
replacing should occur, look into Checkstyle's message.properties for
the according message keys.

The 'value' attribute defines the custom message patterns including
message parameter placeholders as defined in the original Checkstyle
messages (again see message.properties for reference).
-->
<!ELEMENT message EMPTY>
<!ATTLIST message
key NMTOKEN #REQUIRED
value CDATA #REQUIRED
>
8 changes: 8 additions & 0 deletions config/checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0"?>

<!DOCTYPE suppressions PUBLIC
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
"suppressions_1_2.dtd">

<suppressions>
</suppressions>
16 changes: 16 additions & 0 deletions config/checkstyle/suppressions_1_2.dtd
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!-- Add the following to any file that is to be validated against this DTD:

<!DOCTYPE suppressions PUBLIC
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
-->

<!ELEMENT suppressions (suppress*)>

<!ELEMENT suppress EMPTY>
<!ATTLIST suppress files CDATA #IMPLIED
checks CDATA #IMPLIED
message CDATA #IMPLIED
id CDATA #IMPLIED
lines CDATA #IMPLIED
columns CDATA #IMPLIED>
6 changes: 3 additions & 3 deletions src/main/java/com/backendoori/ootw/OotwApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
@SpringBootApplication
public class OotwApplication {

public static void main(String[] args) {
SpringApplication.run(OotwApplication.class, args);
}
public static void main(String[] args) {
SpringApplication.run(OotwApplication.class, args);
}

}
2 changes: 1 addition & 1 deletion src/main/java/com/backendoori/ootw/domain/BaseEntity.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.backendoori.ootw.domain;

import java.time.LocalDateTime;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.MappedSuperclass;
import java.time.LocalDateTime;
import lombok.Getter;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
Expand Down

0 comments on commit 4e8c971

Please sign in to comment.