mirror of
https://github.com/github/awesome-copilot.git
synced 2026-02-20 10:25:13 +00:00
enforcing style rules (#32)
* Fixing line endings and removing dead code * Missing descriptions due to line endings * Enforcing that the line endings should be LF * Potential fix for code scanning alert no. 18: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Fixing readme generator --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
29
.github/workflows/check-line-endings.yml
vendored
Normal file
29
.github/workflows/check-line-endings.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Check Line Endings
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
check-line-endings:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Check for CRLF line endings in markdown files
|
||||
run: |
|
||||
! grep -l $'\r' $(find . -name "*.md")
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "✅ No CRLF line endings found in markdown files"
|
||||
exit 0
|
||||
else
|
||||
echo "❌ CRLF line endings found in markdown files"
|
||||
echo "Files with CRLF line endings:"
|
||||
grep -l $'\r' $(find . -name "*.md")
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user