Skip to content

Commit 0f6d647

Browse files
Add reusable line endings check workflow (#2246)
* Add reusable line endings check workflow * Add default text=auto eol=lf to .gitattributes * Pin reusable workflow to commit SHA
1 parent 6eaefa7 commit 0f6d647

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Default: normalize text files to LF in the repo and on checkout.
2+
* text=auto eol=lf
3+
14
# On Windows, running "git apply" with CRLF patch files causes an error for binary files:
25
# "git diff header lacks filename information when removing 1 leading pathname component".
36
# To fix this, always check out patch files as LF.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Check Line Endings
2+
3+
on:
4+
push:
5+
branches:
6+
- "microsoft/*"
7+
pull_request:
8+
branches:
9+
- "microsoft/*"
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
check-line-endings:
16+
uses: microsoft/go-infra/.github/workflows/check-line-endings.yml@944d1d054c1265bf35b6632d42682217330907c4 # main

0 commit comments

Comments
 (0)