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

ci: add line ending check workflow for current pr #336

Merged
merged 4 commits into from
Aug 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: fernandrone/linelint@0.0.6
with:
fetch-depth: 0

- name: Find files missing end line break
run: |
files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }})
success=true
for file in $files; do
if [ "$(tail -c 1 $file | wc -l)" -eq 0 ]; then
echo "- $file" >> $GITHUB_STEP_SUMMARY
success=false
fi
done

if [ "$success" = false ]; then
echo -e "\n:warning: 위 파일들의 끝에 누락된 줄 바꿈을 추가해 주세요." >> $GITHUB_STEP_SUMMARY
exit 1
fi
Comment on lines +16 to +28
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

와, 맨 처음 스크립트에 비해서 진짜 간단해졌네요 ㅎㅎ 🕺

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네네 다행히 간단히 줄일 수 있었습니다! 요거는 전에 승인 주셨으니 병합 진행할게요!