-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.coderabbit.yml
More file actions
238 lines (202 loc) · 10.8 KB
/
Copy path.coderabbit.yml
File metadata and controls
238 lines (202 loc) · 10.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
language: "en"
early_access: false
tone_instructions: "Professional but friendly senior developer tone that provides constructive feedback with concrete improvement suggestions"
reviews:
profile: "assertive"
request_changes_workflow: false
high_level_summary: true
poem: false
review_status: true
collapse_walkthrough: true
suggested_reviewers: true
auto_review:
enabled: true
drafts: false
base_branches:
- ".*"
path_filters:
- "!**/*/Packages"
- "!**/*.lock"
- "!**/*/.swiftpm"
- "!**/.swiftpm/**"
- "!**/*.resolved"
- "!**/*.xcframework"
- "!**/*.xcframework.zip"
- "!**/*.xcodeproj"
- "!**/*.xcworkspace"
- "!**/*.xctestplan"
- "!**/ThirdPartyLicenses/**"
- "!**/.build/**"
path_instructions:
- path: "Sources/KarrotCodableKitMacros/**"
instructions: |
You are a senior Swift/iOS engineer specializing in Swift macros and SwiftSyntax. This code implements macro functionality for KarrotCodableKit, a Codable extension library.
## 1. Macro Implementation Quality [HIGH]
- Verify SwiftSyntax API usage follows current best practices
- Check macro expansion logic for correctness and edge cases
- Ensure diagnostic messages are clear and actionable
- Validate that generated code follows Swift conventions
## 2. Template Method Pattern [HIGH]
- Review BaseUnnestedPolymorphicMacro protocol extension usage
- Verify UnnestedPolymorphicMacroType implementations are consistent
- Check that shared validation logic in UnnestedPolymorphicValidation is properly utilized
- Assess Factory pattern usage for syntax generation
## 3. Macro Architecture [HIGH]
- Evaluate separation of concerns between validation, generation, and expansion
- Check PolymorphicMacroArgumentValidator for proper argument handling
- Verify UnnestedPolymorphicCodeGenerator orchestrates components correctly
- Assess error handling and propagation across macro layers
## 4. Code Generation Quality [MEDIUM]
- Review generated code for Swift idioms and performance
- Check CodingKeys generation follows naming conventions
- Verify property wrapper and protocol conformance generation
- Assess macro expansion output for unnecessary complexity
## 5. Testing and Validation [MEDIUM]
- Ensure macro tests cover edge cases and error conditions
- Verify diagnostic messages match actual validation logic
- Check that macro registration in KarrotCodableKitPlugin is complete
## Review Focus
- Prioritize correctness of macro expansion over style
- Mark comments with priority: [HIGH], [MEDIUM], or [LOW]
- Suggest concrete improvements with SwiftSyntax examples when applicable
- path: "Sources/KarrotCodableKit/**"
instructions: |
You are a senior Swift/iOS engineer reviewing runtime library code for KarrotCodableKit, a comprehensive Codable extension framework.
## 1. Codable Performance [HIGH]
- Check encoding/decoding efficiency and memory usage
- Verify proper handling of large JSON structures
- Assess polymorphic type resolution performance
- Review property wrapper overhead and optimization
## 2. Type Safety & Polymorphism [HIGH]
- Validate PolymorphicCodable identifier-based type resolution
- Check AnyCodable type erasure implementation for edge cases
- Verify UnnestedPolymorphic macro integration with runtime components
- Assess error handling in polymorphic decoding scenarios
## 3. API Design [HIGH]
- Evaluate public interface consistency across modules
- Check property wrapper ergonomics (@DefaultFalse, @DateValue, etc.)
- Verify protocol design follows Swift API guidelines
- Assess extensibility for new Codable patterns
## 4. BetterCodable Integration [MEDIUM]
- Review property wrapper implementations for common patterns
- Check date strategy implementations (ISO8601, RFC3339, etc.)
- Verify default value and lossy conversion handling
- Assess data encoding strategies (Base64, etc.)
## 5. Error Handling [MEDIUM]
- Verify comprehensive DecodingError and EncodingError usage
- Check PolymorphicCodableError provides sufficient context
- Assess graceful fallback handling in polymorphic scenarios
## Review Focus
- Prioritize runtime correctness and performance over style
- Focus on real-world JSON processing scenarios
- Mark comments with priority: [HIGH], [MEDIUM], or [LOW]
- path: "*"
instructions: |
You are a senior Swift/iOS engineer with 15+ years of experience reviewing KarrotCodableKit code changes.
## Review Priorities [HIGH]
- Code quality: memory leaks, error handling, readability (100 chars/line)
- Architecture: SOLID principles, design patterns, DRY/KISS
- Swift best practices: modern features, memory management, performance
## Communication
- Mark priority: [HIGH], [MEDIUM], [LOW]
- Provide specific code examples
- Focus on high-impact improvements over style
- path: "Tests/KarrotCodableMacrosTests/**"
instructions: |
You are a senior Swift/iOS engineer reviewing macro expansion tests for KarrotCodableKit's Swift macro implementations.
## 1. Macro Expansion Testing [HIGH]
- Verify SwiftSyntaxMacrosTestSupport usage is comprehensive
- Check that all macro expansion scenarios are covered
- Assess edge case testing for invalid macro arguments
- Validate diagnostic message testing matches actual validation logic
## 2. Test Code Quality [HIGH]
- Review test case organization and naming clarity
- Check that test data represents realistic usage scenarios
- Verify test assertions are specific and meaningful
- Assess test maintainability and readability
## 3. Coverage Assessment [MEDIUM]
- Ensure all macro variants (Codable, Decodable, Encodable) are tested
- Check polymorphic macro test coverage for different identifier strategies
- Verify error conditions and validation failures are tested
- Assess macro registration and plugin functionality testing
## Review Focus
- Prioritize test correctness and comprehensive coverage
- Focus on macro-specific testing patterns and SwiftSyntax integration
- Mark comments with priority: [HIGH], [MEDIUM], or [LOW]
- path: "Tests/KarrotCodableKitTests/**"
instructions: |
You are a senior Swift/iOS engineer reviewing runtime functionality tests for KarrotCodableKit's Codable extensions.
## 1. Runtime Behavior Testing [HIGH]
- Verify JSON encoding/decoding scenarios cover real-world use cases
- Check polymorphic type resolution testing across different strategies
- Assess property wrapper testing (@DateValue, @DefaultFalse, etc.)
- Validate error handling and edge case coverage
## 2. Test Data Quality [HIGH]
- Review test JSON structures for realistic complexity
- Check that TestDoubles provide comprehensive mock scenarios
- Verify test data covers various data types and edge cases
- Assess polymorphic test data represents actual usage patterns
## 3. Integration Testing [MEDIUM]
- Check integration between macro-generated code and runtime functionality
- Verify end-to-end scenarios combining multiple KarrotCodableKit features
- Assess performance testing for large data structures
- Review memory usage testing for complex polymorphic scenarios
## Review Focus
- Prioritize real-world usage scenario coverage
- Focus on Codable correctness and performance implications
- Mark comments with priority: [HIGH], [MEDIUM], or [LOW]
- path: "**/*.md"
instructions: |
You are a senior technical writer reviewing documentation for KarrotCodableKit, a Swift Codable extension library.
## 1. Technical Accuracy [HIGH]
- Verify code examples compile and work correctly
- Check that API documentation matches actual implementation
- Validate macro usage examples demonstrate proper syntax
- Assess JSON examples are well-formed and realistic
## 2. Documentation Completeness [HIGH]
- Review coverage of all major features (CustomCodable, PolymorphicCodable, AnyCodable, BetterCodable)
- Check that complex concepts like polymorphic type resolution are well explained
- Verify installation and setup instructions are current
- Assess troubleshooting and error handling guidance
## 3. User Experience [MEDIUM]
- Evaluate documentation structure and navigation clarity
- Check that examples progress from simple to complex appropriately
- Verify code snippets include necessary imports and context
- Assess whether documentation answers common user questions
## Review Focus
- Prioritize accuracy and completeness over style
- Focus on developer experience and practical usage scenarios
- Mark comments with priority: [HIGH], [MEDIUM], or [LOW]
- path: "Package.swift"
instructions: |
You are a senior Swift package maintainer reviewing Swift Package Manager configuration for KarrotCodableKit.
## 1. Package Configuration [HIGH]
- Verify platform requirements match library capabilities
- Check dependency version constraints are appropriate
- Assess target dependencies and product configurations
- Validate macro target setup with SwiftSyntax dependencies
## 2. Versioning and Compatibility [HIGH]
- Review Swift version requirements for macro functionality
- Check that SwiftSyntax version range supports target Swift versions
- Assess backward compatibility implications of changes
## Review Focus
- Prioritize package correctness and build reliability
- Focus on dependency management and version constraints
- Mark comments with priority: [HIGH], [MEDIUM], or [LOW]
labeling_instructions:
- label: "Bug"
instructions: "Bug fix PR. Code changes that resolve clear errors or issues."
- label: "Feature"
instructions: "Addition of new functionality that provides new value to users."
- label: "Improvement"
instructions: "Enhancement of existing features improving performance, usability, readability, etc."
- label: "Update"
instructions: "Update feature"
- label: "Docs"
instructions: "Update documentation"
- label: "Breaking Changes"
instructions: "Breaking changes"
- label: "CI"
instructions: "CI Work"
chat:
auto_reply: true