Skip to content

Commit e2f4ff4

Browse files
committed
add copilot instructions
1 parent 0b6e500 commit e2f4ff4

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copilot Instructions
2+
3+
## Test Conventions
4+
- Prefer test method names without underscores
5+
- create XML comments for test methods
6+
- use Arrange, Act and Assert comments only for tests that are larger than 25 lines
7+
- try to keep the tests short and maintainable (under 25 lines)
8+
9+
## C# Style
10+
11+
- **No `var`** - always use the explicit type on the left side; use implicit `new()` on the right side
12+
```csharp
13+
// correct
14+
MemberInfo member = GetMember<NoAttributes>(nameof(NoAttributes.Value));
15+
ReflectionTestClass target = new();
16+
17+
// wrong
18+
var member = GetMember<NoAttributes>(nameof(NoAttributes.Value));
19+
```
20+
- prefer expression collection syntax (\[item1, item2\]) over new string\[\] { item1, item2 }

0 commit comments

Comments
 (0)