SonarQube Plugins
  1. SonarQube Plugins
  2. SONARPLUGINS-2993

Rule: List items like <li> or <dt> should always be contained within <ul>, <ol> or <dl> tags

    Details

    • Number of attachments :
      0

      Issue Links

        Activity

        Hide
        Dinesh Bolkensteyn added a comment -

        Done

        Show
        Dinesh Bolkensteyn added a comment - Done
        Hide
        Freddy Mallet added a comment -

        Manually tested !

        Show
        Freddy Mallet added a comment - Manually tested !
        Hide
        Dinesh Bolkensteyn added a comment -

        There are false positives:

        <ul>    
        <li><p><a href="https://bugs.webkit.org/show_bug.cgi?id=22920">Bug 22920: Inspector Request Headers Should Show Data/Variables/Parameters Sent With Request</a>
        <li><p><a href="https://bugs.webkit.org/show_bug.cgi?id=28970">Bug 28970: content-type parameters not taken into account when building form-data</a>
        </ul>
        
        Show
        Dinesh Bolkensteyn added a comment - There are false positives: <ul> <li><p><a href= "https: //bugs.webkit.org/show_bug.cgi?id=22920" >Bug 22920: Inspector Request Headers Should Show Data/Variables/Parameters Sent With Request</a> <li><p><a href= "https: //bugs.webkit.org/show_bug.cgi?id=28970" >Bug 28970: content-type parameters not taken into account when building form-data</a> </ul>
        Hide
        Dinesh Bolkensteyn added a comment -

        The problem actually only occurs when in presence of unclosded tags, as in:

        <ul>
          <li><p>foo
          <li><p>bar
        </ul>
        

        but if this is rewritten as below, then the problem disappears:

        <ul>
          <li><p>foo</p>
          <li><p>bar</p>
        </ul>
        
        Show
        Dinesh Bolkensteyn added a comment - The problem actually only occurs when in presence of unclosded tags, as in: <ul> <li><p>foo <li><p>bar </ul> but if this is rewritten as below, then the problem disappears: <ul> <li><p>foo</p> <li><p>bar</p> </ul>
        Hide
        Dinesh Bolkensteyn added a comment -

        Okie to fix those false positives, we need to relax the check to accept:

        <ul>
          <foo>
            <li>    <!-- Compliant - limitation because of bad unclosed tags handling -->
          </foo>
        </ul>
        

        The best thing to do would be to improve the way unclosed tags are handled, I'm going to create a ticket for that.

        Show
        Dinesh Bolkensteyn added a comment - Okie to fix those false positives, we need to relax the check to accept: <ul> <foo> <li> <!-- Compliant - limitation because of bad unclosed tags handling --> </foo> </ul> The best thing to do would be to improve the way unclosed tags are handled, I'm going to create a ticket for that.
        Hide
        Dinesh Bolkensteyn added a comment -

        Solved!

        Show
        Dinesh Bolkensteyn added a comment - Solved!
        Hide
        Dinesh Bolkensteyn added a comment -

        Wow, it went down from 786 violations to just 36!

        Show
        Dinesh Bolkensteyn added a comment - Wow, it went down from 786 violations to just 36!
        Hide
        Freddy Mallet added a comment -

        Manually tested !

        Show
        Freddy Mallet added a comment - Manually tested !

          People

          • Assignee:
            Dinesh Bolkensteyn
            Reporter:
            Freddy Mallet
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: