-
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 3 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,31 @@ | ||
| 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 references to the relevant documentation. | ||
|
|
||
| ## 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. | ||
|
|
||
| At the start of every review, say "Started reviewing". | ||
| At the end of every review, say "Done reviewing". | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -62,6 +62,7 @@ import { | |||||||||
| import toNS from 'mongodb-ns'; | ||||||||||
| import { getNamespaceRelationships } from '../utils/utils'; | ||||||||||
| import { usePreference } from 'compass-preferences-model/provider'; | ||||||||||
| import { use } from 'chai'; | ||||||||||
paula-stacho marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||
|
|
||||||||||
| const loadingContainerStyles = css({ | ||||||||||
| width: '100%', | ||||||||||
|
|
@@ -233,6 +234,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.