The analyzer has detected a suspicious method call, the return value of which is ignored. Calling some methods without using their return values is pointless.
The example:
/**
* @param {string} input
* @returns {string}
*/
function escape(input) {
input.replaceAll(";", "\\;")
input.replaceAll(",", "\\,")
return input
}
In this case, the replaceAll method is called, but the call result is ignored. The replaceAll method returns a new string without modifying the original one on which the method was called. As a result, the string containing the necessary modification is not used.
For the modifications to take effect, save the result:
/**
* @param {string} input
* @returns {string}
*/
function escape(input) {
input = input.replaceAll(";", "\\;")
input = input.replaceAll(",", "\\,")
return input
}
This diagnostic rule is classified as:
You can look at examples of errors detected by the V7010 diagnostic. |
Was this page helpful?
Your message has been sent. We will email you at
If you do not see the email in your inbox, please check if it is filtered to one of the following folders: