-
Notifications
You must be signed in to change notification settings - Fork 0
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
Roast me pls #16
Roast me pls #16
Conversation
@@ -78,6 +78,27 @@ async function analyzeCode( | |||
return comments; | |||
} | |||
|
|||
function reallyGoodCode() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function reallyGoodCode
is poorly named and does not convey its purpose. Consider renaming it to something more descriptive.
@@ -78,6 +78,27 @@ async function analyzeCode( | |||
return comments; | |||
} | |||
|
|||
function reallyGoodCode() { | |||
for (let i=0; i<10; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The nested loops create a time complexity of O(n^6), which is highly inefficient. This should be refactored to avoid such deep nesting.
@@ -78,6 +78,27 @@ async function analyzeCode( | |||
return comments; | |||
} | |||
|
|||
function reallyGoodCode() { | |||
for (let i=0; i<10; i++) { | |||
console.log("i loop"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using console.log
in a loop for debugging is not a good practice. Consider using a more structured logging approach or removing these logs entirely.
} | ||
} | ||
} | ||
|
||
function createPrompt(file: File, chunk: Chunk, prDetails: PRDetails): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The createPrompt
function is overly verbose and could be simplified. Consider breaking it down into smaller, more manageable parts.
No description provided.