Skip to content

Commit 0166649

Browse files
committed
Enforcing that the line endings should be LF
1 parent 017312a commit 0166649

File tree

9 files changed

+156
-26
lines changed

9 files changed

+156
-26
lines changed

.editorconfig

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# All files
7+
[*]
8+
indent_style = space
9+
indent_size = 2
10+
end_of_line = lf
11+
charset = utf-8
12+
trim_trailing_whitespace = true
13+
insert_final_newline = true
14+
15+
# Markdown files
16+
[*.md]
17+
trim_trailing_whitespace = false
18+
max_line_length = off
19+
20+
# JSON files
21+
[*.json]
22+
indent_size = 2
23+
24+
# JavaScript files
25+
[*.js]
26+
indent_size = 2
27+
28+
# Shell scripts
29+
[*.sh]
30+
end_of_line = lf
31+
32+
# Windows scripts
33+
[*.{cmd,bat}]
34+
end_of_line = crlf

.gitattributes

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Set default behavior to automatically normalize line endings.
2+
* text=auto eol=lf
3+
4+
# Explicitly declare text files to be normalized and converted to native line endings on checkout.
5+
*.md text eol=lf
6+
*.txt text eol=lf
7+
*.js text eol=lf
8+
*.json text eol=lf
9+
*.yml text eol=lf
10+
*.yaml text eol=lf
11+
*.html text eol=lf
12+
*.css text eol=lf
13+
*.scss text eol=lf
14+
*.ts text eol=lf
15+
*.sh text eol=lf
16+
17+
# Windows-specific files that should retain CRLF line endings
18+
*.bat text eol=crlf
19+
*.cmd text eol=crlf
20+
21+
# Binary files that should not be modified
22+
*.png binary
23+
*.jpg binary
24+
*.jpeg binary
25+
*.gif binary
26+
*.ico binary
27+
*.zip binary
28+
*.pdf binary
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Check Line Endings
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
check-line-endings:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Check for CRLF line endings in markdown files
16+
run: |
17+
! grep -l $'\r' $(find . -name "*.md")
18+
if [ $? -eq 0 ]; then
19+
echo "✅ No CRLF line endings found in markdown files"
20+
exit 0
21+
else
22+
echo "❌ CRLF line endings found in markdown files"
23+
echo "Files with CRLF line endings:"
24+
grep -l $'\r' $(find . -name "*.md")
25+
exit 1
26+
fi

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
22
*.orig
3+
[Cc]opilot-[Pp]rocessing.md

.vscode/extensions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"editorconfig.editorconfig",
4+
"davidanson.vscode-markdownlint"
5+
]
6+
}

.vscode/settings.json

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
11
{
2-
"chat.modeFilesLocations": {
3-
"chatmodes": true
4-
},
5-
"chat.promptFilesLocations": {
6-
"prompts": true
7-
},
8-
"chat.instructionsFilesLocations": {
9-
"instructions": true
10-
}
11-
}
2+
"chat.modeFilesLocations": {
3+
"chatmodes": true
4+
},
5+
"chat.promptFilesLocations": {
6+
"prompts": true
7+
},
8+
"chat.instructionsFilesLocations": {
9+
"instructions": true
10+
},
11+
"files.eol": "\n",
12+
"files.insertFinalNewline": true,
13+
"files.trimTrailingWhitespace": true,
14+
"[markdown]": {
15+
"files.trimTrailingWhitespace": false,
16+
"editor.formatOnSave": true
17+
},
18+
"editor.rulers": [
19+
100
20+
],
21+
"files.associations": {
22+
"*.chatmode.md": "markdown",
23+
"*.instructions.md": "markdown",
24+
"*.prompt.md": "markdown"
25+
}
26+
}

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,17 @@ Custom chat modes define specific behaviors and tools for GitHub Copilot Chat, e
7979
- [Custom Chat Modes](https://code.visualstudio.com/docs/copilot/chat/chat-modes) - Advanced chat configuration
8080
- [VS Code Settings](https://code.visualstudio.com/docs/getstarted/settings) - General VS Code configuration guide
8181

82+
## 🛠️ Development Configuration
83+
84+
This repository uses various configuration files to ensure consistent code style and avoid issues with line endings:
85+
86+
- [`.editorconfig`](.editorconfig) - Defines coding styles across different editors and IDEs
87+
- [`.gitattributes`](.gitattributes) - Ensures consistent line endings in text files
88+
- [`.vscode/settings.json`](.vscode/settings.json) - VS Code-specific settings for this repository
89+
- [`.vscode/extensions.json`](.vscode/extensions.json) - Recommended VS Code extensions
90+
91+
> 💡 **Note**: All markdown files in this repository use LF line endings (Unix-style) to avoid mixed line endings issues. The repository is configured to automatically handle line endings conversion.
92+
8293

8394
## 📄 License
8495

@@ -94,4 +105,4 @@ This project may contain trademarks or logos for projects, products, or services
94105
trademarks or logos is subject to and must follow
95106
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
96107
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
97-
Any use of third-party trademarks or logos are subject to those third-party's policies.
108+
Any use of third-party trademarks or logos are subject to those third-party's policies.

SUPPORT.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# Support
2-
3-
## How to file issues and get help
4-
5-
This project uses GitHub issues to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new issue.
6-
7-
For help or questions about using this project, please raise an issue on GitHub.
8-
9-
Please include one of the following statements file:
10-
11-
- **Awesome Copilot Prompts** is under active development and maintained by GitHub and Microsoft staff **AND THE COMMUNITY**. We will do our best to respond to support, feature requests, and community questions in a timely manner.
12-
-
13-
## GitHub Support Policy
14-
15-
Support for this project is limited to the resources listed above.
1+
# Support
2+
3+
## How to file issues and get help
4+
5+
This project uses GitHub issues to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new issue.
6+
7+
For help or questions about using this project, please raise an issue on GitHub.
8+
9+
Please include one of the following statements file:
10+
11+
- **Awesome Copilot Prompts** is under active development and maintained by GitHub and Microsoft staff **AND THE COMMUNITY**. We will do our best to respond to support, feature requests, and community questions in a timely manner.
12+
-
13+
## GitHub Support Policy
14+
15+
Support for this project is limited to the resources listed above.

scripts/fix-line-endings.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
# Script to fix line endings in all markdown files
3+
4+
echo "Normalizing line endings in markdown files..."
5+
6+
# Find all markdown files and convert CRLF to LF
7+
find . -name "*.md" -type f -exec sed -i 's/\r$//' {} \;
8+
9+
echo "Done! All markdown files now have LF line endings."

0 commit comments

Comments
 (0)