SonarQube
Enterprise Edition
Version 9.4 (build 54424)
In my asp.net framework 4.8 project, I have an aspx file with code similar to the following:
<asp:Repeater ID="TestRepeater" runat="server">
<HeaderTemplate>
<ul>
</HeaderTemplate>
<FooterTemplate>
</ul>
</FooterTemplate>
<ItemTemplate>
<li>Test</li>
</ItemTemplate>
</asp:Repeater>
This code reports a BUG with the following rule:
Web:ItemTagNotWithinContainerTagCheck
"<li>" and "<dt>" item tags should be in "<ul>", "<ol>" or "<dl>" container tags
The output for this code above with 3 repeateritems would look like the following:
<ul>
<li>Test</li>
<li>Test</li>
<li>Test</li>
</ul>
I believe this to be a false positive because in the example above, when the code renders my page, the ul tag in the header template will be rendered first and then the repeating item template will render the li tags (for however many repeateritems I have) and lastly the closing ul tage from the footer template. The output will be syntactically correct and wont break this rule.