You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The logic checks that before the @frappe.whitelist string are there an equal number of single/double quotes, or comment blocks (opening and closing) or not.
This fails when a comment might have an ' or " but no closing tag. (for example: the comment could be like:
Need to check the customer's ID
This would cause the API to be regarded as being inside a comment.
Possible solution: do not try to guess if the code is inside a comment or not - maybe have a flag that can tell the users that the API might be commented out, but still show the API on the UI. Or only test for triple strings only, and leave the single/double quotes from the logic.
The logic checks that before the
@frappe.whitelist
string are there an equal number of single/double quotes, or comment blocks (opening and closing) or not.This fails when a comment might have an
'
or"
but no closing tag. (for example: the comment could be like:This would cause the API to be regarded as being inside a comment.
Possible solution: do not try to guess if the code is inside a comment or not - maybe have a flag that can tell the users that the API might be commented out, but still show the API on the UI. Or only test for triple strings only, and leave the single/double quotes from the logic.
Reference:
commit/commit/commit/code_analysis/apis.py
Line 50 in 656e880
The text was updated successfully, but these errors were encountered: