Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace the static comment examples with relevant ones from the Vector DB #4236

Closed
suhaibmujahid opened this issue Jun 9, 2024 · 0 comments · Fixed by #4237
Closed

Replace the static comment examples with relevant ones from the Vector DB #4236

suhaibmujahid opened this issue Jun 9, 2024 · 0 comments · Fixed by #4237
Assignees

Comments

@suhaibmujahid
Copy link
Member

Currently, the review tool uses a static list of comment examples:

[
{{
"file": "com/br/main/Pressure.java",
"code_line": 458,
"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."
}},
{{
"file": "com/pt/main/atp/Texture.cpp",
"code_line": 620,
"comment" : "The `filterAAR` function inside `#updateAllowAllRequestRules()` is created every time the method is called. Consider defining this function outside of the method to avoid unnecessary function creation."
}},
{{
"file": "drs/control/Statistics.cpp",
"code_line": 25,
"comment" : "The condition in the `if` statement is a bit complex and could be simplified for better readability. Consider extracting `!Components.isSuccessCode(status) && blockList.includes(ChromeUtils.getXPCOMErrorName(status))` into a separate function with a descriptive name, such as `isBlockedError`."
}}
]

We should use more relevant examples by searching comments on similar changes from the Vector DB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant