Skip to content

Commit 04c5757

Browse files
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>
1 parent 99fb7e1 commit 04c5757

File tree

12 files changed

+197
-127
lines changed

12 files changed

+197
-127
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: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Check Line Endings
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
check-line-endings:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Check for CRLF line endings in markdown files
19+
run: |
20+
! grep -l $'\r' $(find . -name "*.md")
21+
if [ $? -eq 0 ]; then
22+
echo "✅ No CRLF line endings found in markdown files"
23+
exit 0
24+
else
25+
echo "❌ CRLF line endings found in markdown files"
26+
echo "Files with CRLF line endings:"
27+
grep -l $'\r' $(find . -name "*.md")
28+
exit 1
29+
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: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ Ready-to-use prompt templates for specific development scenarios and tasks, defi
5555
- [Product Manager Assistant: Feature Identification and Specification](prompts/gen-specs-as-issues.prompt.md) - This workflow guides you through a systematic approach to identify missing features, prioritize them, and create detailed specifications for implementation.
5656
- [Javascript Typescript Jest](prompts/javascript-typescript-jest.prompt.md) - Best practices for writing JavaScript/TypeScript tests using Jest, including mocking strategies, test structure, and common patterns.
5757
- [Multi Stage Dockerfile](prompts/multi-stage-dockerfile.prompt.md) - Create optimized multi-stage Dockerfiles for any language or framework
58-
- [My Issues](prompts/my-issues.prompt.md)
59-
- [My Pull Requests](prompts/my-pull-requests.prompt.md)
58+
- [My Issues](prompts/my-issues.prompt.md) - List my issues in the current repository
59+
- [My Pull Requests](prompts/my-pull-requests.prompt.md) - List my pull requests in the current repository
6060

6161
> 💡 **Usage**: Use `/prompt-name` in VS Code chat, run `Chat: Run Prompt` command, or hit the run button while you have a prompt open.
6262
@@ -79,6 +79,16 @@ 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.
8292
8393
## 📄 License
8494

@@ -90,8 +100,8 @@ Please note that this project is released with a [Contributor Code of Conduct](C
90100

91101
## ™️ Trademarks
92102

93-
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
94-
trademarks or logos is subject to and must follow
103+
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
104+
trademarks or logos is subject to and must follow
95105
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
96106
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
97107
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.

prompts/my-issues.prompt.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
---
2-
mode: 'agent'
3-
tools: ['githubRepo', 'github', 'get_issue', 'get_issue_comments', 'get_me', 'list_issues']
4-
description: 'List my issues in the current repository'
5-
---
6-
7-
Search the current repo (using #githubRepo for the repo info) and list any issues you find (using #list_issues) that are assigned to me.
8-
9-
Suggest issues that I might want to focus on based on their age, the amount of comments, and their status (open/closed).
1+
---
2+
mode: 'agent'
3+
tools: ['githubRepo', 'github', 'get_issue', 'get_issue_comments', 'get_me', 'list_issues']
4+
description: 'List my issues in the current repository'
5+
---
6+
7+
Search the current repo (using #githubRepo for the repo info) and list any issues you find (using #list_issues) that are assigned to me.
8+
9+
Suggest issues that I might want to focus on based on their age, the amount of comments, and their status (open/closed).

prompts/my-pull-requests.prompt.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
---
2-
mode: 'agent'
3-
tools: ['githubRepo', 'github', 'get_me', 'get_pull_request', 'get_pull_request_comments', 'get_pull_request_diff', 'get_pull_request_files', 'get_pull_request_reviews', 'get_pull_request_status', 'list_pull_requests', 'request_copilot_review']
4-
description: 'List my pull requests in the current repository'
5-
---
6-
7-
Search the current repo (using #githubRepo for the repo info) and list any pull requests you find (using #list_pull_requests) that are assigned to me.
8-
9-
Describe the purpose and details of each pull request.
10-
11-
If a PR is waiting for someone to review, highlight that in the response.
12-
13-
If there were any check failures on the PR, describe them and suggest possible fixes.
14-
15-
If there was no review done by Copilot, offer to request one using #request_copilot_review.
1+
---
2+
mode: 'agent'
3+
tools: ['githubRepo', 'github', 'get_me', 'get_pull_request', 'get_pull_request_comments', 'get_pull_request_diff', 'get_pull_request_files', 'get_pull_request_reviews', 'get_pull_request_status', 'list_pull_requests', 'request_copilot_review']
4+
description: 'List my pull requests in the current repository'
5+
---
6+
7+
Search the current repo (using #githubRepo for the repo info) and list any pull requests you find (using #list_pull_requests) that are assigned to me.
8+
9+
Describe the purpose and details of each pull request.
10+
11+
If a PR is waiting for someone to review, highlight that in the response.
12+
13+
If there were any check failures on the PR, describe them and suggest possible fixes.
14+
15+
If there was no review done by Copilot, offer to request one using #request_copilot_review.

0 commit comments

Comments
 (0)