Skip to content

Commit afbcc5b

Browse files
feat: update C# instructions and enhance package-lock with peer dependencies (#8)
* feat: update C# instructions and enhance package-lock with peer dependencies * Updated based on PR freedback * Update instructions/csharp.instructions.md Co-authored-by: Daniel Olvera <139163393+danOIntellitect@users.noreply.github.com> --------- Co-authored-by: Daniel Olvera <139163393+danOIntellitect@users.noreply.github.com>
1 parent f3fe283 commit afbcc5b

3 files changed

Lines changed: 17 additions & 3 deletions

File tree

.github/upstream-sync-state.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
2+
"instructions\\csharp.instructions.md": {
3+
"branch": "sync/instructions-csharp-instructions-md",
4+
"upstreamSha": "206e2766109198bf687c5e5107e9c6994f1e1dc0"
5+
},
26
"prompts/csharp-xunit.prompt.md": {
37
"branch": "sync/prompts-csharp-xunit-prompt-md",
48
"upstreamSha": "6fb794bc7917fff6a259ae3ba72cd1fad350c0bf"

instructions/csharp.instructions.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ applyTo: '**/*.cs'
66
# C# Development
77

88
## C# Instructions
9-
- Always use the latest version C#, currently C# 13 features.
9+
- Always use the latest version C#, currently C# 14 features.
1010
- Write clear and concise comments for each function.
1111

1212
## General Instructions
@@ -19,13 +19,17 @@ applyTo: '**/*.cs'
1919

2020
- Favor clarity over brevity when naming identifiers.
2121
- Do not use abbreviations or contractions within identifier names.
22+
- Follow PascalCase for component names, method names, and public members.
23+
- Use camelCase for private fields and local variables.
24+
- Prefix interface names with "I" (e.g., IUserService).
2225

2326
## Formatting
2427

2528
- Apply code-formatting style defined in `.editorconfig`.
2629
- Use file-scoped namespace declarations (C# 10.0 or later).
27-
- Insert a newline before the opening curly brace of any code block.
30+
- Insert a newline before the opening curly brace of any code block (e.g., after `if`, `for`, `while`, `foreach`, `using`, `try`, etc.).
2831
- Avoid omitting braces, except for the simplest single-line if statements.
32+
- Ensure that the final return statement of a method is on its own line.
2933
- Use pattern matching and switch expressions wherever possible.
3034
- Use `nameof` instead of string literals when referring to member names.
3135
- Provide XML doc comments on public APIs when they add more context than the signature alone.
@@ -74,7 +78,12 @@ applyTo: '**/*.cs'
7478

7579
- Always include test cases for critical paths of the application.
7680
- Guide users through creating unit tests using appropriate testing frameworks.
81+
- Do not emit "Act", "Arrange" or "Assert" comments.
7782
- Copy existing style in nearby files for test method names and capitalization.
83+
- Explain integration testing approaches for external services or endpoints.
84+
- Demonstrate how to mock dependencies for effective testing.
85+
- Show how to test authentication and authorization logic.
86+
- Explain test-driven development principles as applied to the current domain.
7887
- Write tests that verify behavior, not implementation details.
7988
- Use meaningful test method names that describe the scenario being tested.
80-
- Demonstrate effective use of mocking for dependencies.
89+
- Demonstrate effective use of mocking for dependencies.

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)