You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bugbug/tools/code_review.py
+13-23Lines changed: 13 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -137,30 +137,21 @@ class LargeDiffError(Exception):
137
137
{comments}"""
138
138
139
139
140
-
PROMPT_TEMPLATE_FILTERING_ANALYSIS="""Please, double check the code review provided for the patch below.
141
-
Just report the comments that are:
142
-
- applicable for the patch;
143
-
- consistent with the {target_code_consistency} source code;
144
-
- focusing on reporting possible bugs, major readability regressions, or similar concerns;
145
-
- filter out any descriptive comments;
146
-
- filter out any praising comments.
140
+
PROMPT_TEMPLATE_FILTERING_ANALYSIS="""Filter review comments to keep those that:
141
+
- are consistent with the {target_code_consistency} source code;
142
+
- focus on reporting possible bugs, functional regressions, issues, or similar concerns;
143
+
- report readability or design concerns.
147
144
148
-
Do not change the contents of the comments and the report format.
149
-
Adopt the template below as the report format:
150
-
[
151
-
{{
152
-
"file": "com/br/main/Pressure.java",
153
-
"code_line": 458,
154
-
"comment" : "In the third code block, you are using `nsAutoStringN<256>` instead of `nsString`. This is a good change as `nsAutoStringN<256>` is more efficient for small strings. However, you should ensure that the size of `tempString` does not exceed 256 characters, as `nsAutoStringN<256>` has a fixed size."
155
-
}}
156
-
]
157
-
Do not report any explanation about your choice. Only return a valid JSON list.
145
+
Exclude comments that:
146
+
- only describe the change;
147
+
- restate obvious facts like renamed variables or replaced code;
148
+
- include praising;
149
+
- ask if changes are intentional or ask to ensure things exist.
158
150
159
-
Review:
160
-
{review}
151
+
Do not report any explanation about your choice. Only return a valid JSON list.
161
152
162
-
Patch:
163
-
{patch}
153
+
Comments:
154
+
{comments}
164
155
165
156
As examples of not expected comments, not related to the current patch, please, check some below:
0 commit comments