We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using a loop and a variable in method (like getElementsByName), the issue is triggered, even if the "name" is unique.
And the issue is called "'undefined' selector is already used. Assign the result in a variable.".
The issue should not be triggered.
The source code that trigger the issue (rewrite to remove proprietary code) :
var row = 3; var indice = 1; while(indice <= row){ var test = document.getElementsByName("test" + indice)[0].value; indice++; }
I don't know if the loop is important, but I have the same problem with the for loop.
1.4.0
9.9.3
Not using the last version of the plugin but did not see any update in the rule file since.
Issue with Javascript, did not check Typescript.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Current Behavior
When using a loop and a variable in method (like getElementsByName), the issue is triggered, even if the "name" is unique.
And the issue is called "'undefined' selector is already used. Assign the result in a variable.".
Expected Behavior
The issue should not be triggered.
Steps to Reproduce
The source code that trigger the issue (rewrite to remove proprietary code) :
I don't know if the loop is important, but I have the same problem with the for loop.
Failure Logs
creedengo-javascript Version
1.4.0
SonarQube Version
9.9.3
Additional Information
Not using the last version of the plugin but did not see any update in the rule file since.
Issue with Javascript, did not check Typescript.
The text was updated successfully, but these errors were encountered: