Skip to content

Commit 2f78a50

Browse files
authored
ci: add line ending check workflow for current pr (#336)
* ci: add line ending check workflow for current pr * ci: replace `fernandrone/linelint` to custom job in integration workflow * ci: remove file * ci: polish `linelint` job
1 parent 521c00b commit 2f78a50

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/integration.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,21 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v4
11-
- uses: fernandrone/[email protected]
11+
with:
12+
fetch-depth: 0
13+
14+
- name: Find files missing end line break
15+
run: |
16+
files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }})
17+
success=true
18+
for file in $files; do
19+
if [ "$(tail -c 1 $file | wc -l)" -eq 0 ]; then
20+
echo "- $file" >> $GITHUB_STEP_SUMMARY
21+
success=false
22+
fi
23+
done
24+
25+
if [ "$success" = false ]; then
26+
echo -e "\n:warning: 위 파일들의 끝에 누락된 줄 바꿈을 추가해 주세요." >> $GITHUB_STEP_SUMMARY
27+
exit 1
28+
fi

0 commit comments

Comments
 (0)