SonarQube - 8.9.6
Scanner - 22.214.171.1242
Shows false bugs for partials having
<li> tags and asks to enclose with
<ul> tags are already added in parent html file.
app/view/index.html.erb - with
<ul> tag and call partial list.html.erb
app/view/shared/list.html.erb - with
To fix the rule we need to identify it. I think you are talking about the rule Web:ItemTagNotWithinContainerTagCheck . Could you confirm?
If I understand correctly, you have some
<li> tags in
list.html.erb that are reported as issues. But the issues are false positives because the
<li> tags are at the root level in the
list.html.erb file, and the
list.html.erb file is correctly included in another file inside
<ul> tags. Could you confirm?
Hey @jaspreet_singh ,
thank you for sharing this with us. This is indeed a false positive.
We have a ticket to track and solve this kind of problem with this rule: [SONARHTML-159] - Jira . We’ll try to get this into the next version to be released.