-
Notifications
You must be signed in to change notification settings - Fork 246
chore: add custom copilot instructions COMPASS-10013 #7628
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
Changes from 5 commits
f76e213
68f87e8
18fc753
0bea5e6
2f9aded
305a512
99314b7
482f6df
64aa340
75377c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| Do not include an overview section in your reviews. | ||
|
|
||
| When reviewing code, focus on: | ||
|
|
||
| ## Performance Red Flags | ||
|
|
||
| - Spot inefficient loops and algorithmic issues | ||
| - Check for memory leaks and resource cleanup | ||
|
|
||
| ## Code Quality Essentials | ||
|
|
||
| - Functions should be focused and appropriately sized | ||
| - Use clear, descriptive naming conventions | ||
| - Ensure proper error handling throughout | ||
| - Suggest changes to improve code readability and maintainability | ||
|
|
||
| ## Best practices | ||
|
|
||
| - Refer to official documentation and best practices for React.js, Redux and Node.js. If you see anti-patterns, highlight them and provide links to the relevant official documentation. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess I don't want to give it too much of an opinion but either here or above I would add a mention of using modern JS practices since its been trained on a lot of legacy stuff, like I see copilot not using for-of when it should etc.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great point! |
||
|
|
||
| ## Review Style | ||
|
|
||
| - Be specific and actionable in feedback | ||
| - Explain the "why" behind recommendations | ||
|
|
||
| ## MongoDB Specifics | ||
|
|
||
| ### Performance antipatterns | ||
|
|
||
| - Warn about db.stats() performance implications, especially in connection with freeStorage: 1. Provide a reference to the official MongoDB documentation. | ||
paula-stacho marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -233,6 +233,12 @@ const DiagramContent: React.FunctionComponent<{ | |||||||||
| isNewlyCreatedDiagram ?? false | ||||||||||
| ); | ||||||||||
|
|
||||||||||
| // This is an antipattern example to be detected by Copilot reviewer | ||||||||||
| const [obj, setObj] = useState({ a: '' }); | ||||||||||
| useEffect(() => { | ||||||||||
| obj.a = 'abc'; | ||||||||||
| }, [obj]); | ||||||||||
paula-stacho marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||
| obj.a = 'abc'; | |
| }, [obj]); | |
| setObj({ a: 'abc' }); | |
| }, []); |
Uh oh!
There was an error while loading. Please reload this page.