Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature/28] checkstyle action 기반으로 lint 검사기 구현 #35

Merged
merged 12 commits into from
Mar 3, 2024
Merged
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# top-most EditorConfig file
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true

[*.bat]
end_of_line = crlf

[*.adoc]
indent_style = space
indent_size = 4
tab_width = 4
trim_trailing_whitespace = true
15 changes: 15 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Spring Boot source code
*.java text eol=lf
*.yml text eol=lf

# C and C++ source code
*.c text eol=lf
*.cpp text eol=lf
*.h text eol=lf

# visual studio project configuration
*.sln text eol=lf
*.vs text eol=lf
*.csproj eol=lf
*.props eol=lf
*.filters eol=lf
38 changes: 38 additions & 0 deletions .github/workflows/checkstyle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: 🎨 Checkstyle

on:
pull_request:
branches: [ main ]
types: [ opened, synchronize, reopened ]


jobs:
checkstyle:
name: checkstyle
runs-on: ubuntu-latest # ubuntu-22.04

strategy:
matrix:
java: [ 17 ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java }}
architecture: x64
cache: "gradle"

- name: Run Checkstyle
uses: nikitasavinov/checkstyle-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: 'github-pr-review'
tool_name: 'Checkstyle for Java'
checkstyle_config: lint-config/namo-checkstyle-rules.xml
properties_file: lint-config/additional.properties
level: warning
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# namo

### ERD Cloud

https://www.erdcloud.com/d/kdtBpLtftuRiBXdvc
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repositories {
}

dependencies {
//data
// data
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
runtimeOnly 'com.mysql:mysql-connector-j'
implementation group: 'org.hibernate', name: 'hibernate-spatial', version: '6.2.0.CR3' // point 저장
Expand Down
1 change: 1 addition & 0 deletions lint-config/additional.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
suppressionFile=./lint-config/namo-checkstyle-suppressions.xml
Loading
Loading