Support Loopback 4#862
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
| @@ -0,0 +1,9 @@ | |||
| // Finds the last function argument in the provided array and returns it. If no function is found, it returns undefined. | |||
There was a problem hiding this comment.
Top-line comment restates the function's behavior. Remove it or replace with a brief explanation of why finding the last callback is necessary for callers.
| // Finds the last function argument in the provided array and returns it. If no function is found, it returns undefined. | |
| // Extracts the callback from variadic arguments to support Node.js APIs that accept an optional callback as the last parameter. |
Details
✨ AI Reasoning
A comment was added that simply restates the implementation: it describes iterating arguments to find the last function and returning undefined otherwise. This provides no design rationale or higher-level context and thus is a 'what' comment that increases maintenance burden.
Reply @AikidoSec feedback: [FEEDBACK] to get better review comments in the future.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
Summary by Aikido
🚀 New Features
⚡ Enhancements
More info