Skip to content

Commit 1d2d47a

Browse files
add copilot instructions (#3963)
1 parent 3c79931 commit 1d2d47a

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/copilot-instructions.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Copilot Instructions for Pull Request Review
2+
3+
## Purpose
4+
These instructions guide Copilot and contributors in reviewing pull requests for the AWS .NET SDK library. The goal is to maintain high code quality, ensure backward compatibility, and follow best practices for library development.
5+
6+
## Review Checklist
7+
8+
### 1. API Compatibility
9+
- Ensure **no breaking changes** are introduced in public APIs.
10+
- All public methods, classes, and interfaces must remain backward compatible unless a major version bump is justified.
11+
12+
### 2. Behavioral Changes
13+
- Check for **changes in behavior** (e.g., logic, side effects, error handling).
14+
- If behavior changes, ensure it is documented and justified in the PR description.
15+
16+
### 3. Dev Config and Versioning
17+
- Every PR must include a **dev config file** with the correct patch, minor, or major notation.
18+
- The dev config should accurately reflect the scope of the change:
19+
- **Patch**: Bug fixes, no API or behavior change.
20+
- **Minor**: New features, backward compatible.
21+
- **Major**: Breaking changes (should be rare).
22+
- Please reference https://github.com/aws/aws-sdk-net/blob/main/CONTRIBUTING.md for details on dev configs.
23+
24+
### 4. Platform Compatibility
25+
- Ensure changes do not break support for the following .NET versions:
26+
- .NET Standard 2.0
27+
- .NET Core 3.1
28+
- .NET 8.0
29+
- .NET Framework 4.7.2
30+
31+
### 5. General Best Practices
32+
- Follow .NET and AWS SDK coding standards.
33+
- Avoid introducing unused code, dependencies, or files.
34+
- Ensure all code is properly formatted and linted.
35+
36+
### 6. Generator Changes
37+
- When replacing handwritten code with generated code, ensure the generated code is functionally equivalent to the original.
38+
- Document any differences, edge cases, or limitations in the PR description.
39+
- If possible, provide a comparison or summary of key behaviors between the old and new implementations.
40+
41+
### 7. General Review Practices
42+
- Review code for bugs, flaws in logic, and potential edge cases.
43+
- Check for correct error handling and input validation.
44+
- Ensure code is maintainable, readable, and follows best practices.
45+
- Look for opportunities to simplify or optimize code where appropriate.
46+
- Look for security vulnerabilities.
47+
48+
## Automated Checks
49+
- Copilot should flag PRs that:
50+
- Introduce breaking changes without a major version bump.
51+
- Lack a dev config file when its required (see https://github.com/aws/aws-sdk-net/blob/main/CONTRIBUTING.md)
52+
- Change public APIs without documentation or tests.
53+
- Have failing unit or integration tests.
54+
- Reduce test coverage for affected code.
55+
- Introduce unhandled exceptions, missing error handling, or poor input validation.
56+
- Increase code complexity or reduce maintainability.
57+
- Do not document or justify changes in logic, edge cases, or optimizations.
58+
- For changes related to migrating custom code to generated code, where evidence of equivalence (e.g., missing test results, behavioral comparison, or documentation) is not provided.
59+

0 commit comments

Comments
 (0)