Skip to content

Commit 71cb1f3

Browse files
committed
OUT: add line endings check
1 parent e8d5eda commit 71cb1f3

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/Line_Endings.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Firebot workflow
2+
3+
name: Line_Endings
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the master branch
8+
push:
9+
pull_request:
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
15+
jobs:
16+
# This workflow contains a single job called "build"
17+
check-line-endings:
18+
# The type of runner that the job will run on
19+
runs-on: ubuntu-latest
20+
21+
# Steps represent a sequence of tasks that will be executed as part of the job
22+
steps:
23+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
24+
- uses: actions/checkout@v4
25+
26+
- name: Check for CRLF line endings
27+
run: |
28+
{ grep -IUlr --exclude={"*.pdf","*.png"} --exclude-dir=".git" $'\r' > tmp.txt || true; }
29+
nlines=$(cat tmp.txt | wc -l)
30+
if [ $nlines -gt 0 ]; then
31+
echo "text files with dos line endings:"
32+
cat tmp.txt
33+
exit 1
34+
fi
35+
36+
37+
38+

0 commit comments

Comments
 (0)