SonarQube
  1. SonarQube
  2. SONAR-1817

Squid rule to create violation on each NOSONAR tag occurence

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5
    • Component/s: Rules
    • Labels:
      None
    • Number of attachments :
      0

      Description

      The drawback of NOSONAR can lead to a bad practise, if developers use it too much. We are not able to watch their code anymore.
      What about counting all the occurences of NOSONAR as a metric, so as to see its use through time ?
      Sometimes I try to perform a search with my editor, looking for this tag through the code, trying to see :

      • how many NOSONAR occurences there are, comparing with my latest review,
      • if NOSONAR was used appropriately : for example, if a comment is written to explain its use

        Issue Links

          Activity

          Hide
          Evgeny Mandrikov added a comment -

          I suppose that this issue duplicates SONAR-1322

          Show
          Evgeny Mandrikov added a comment - I suppose that this issue duplicates SONAR-1322
          Hide
          JoŽl Iviglia added a comment -

          No. In SONAR-1322, the suggestion is to enable/disable it, or detect its use as a violation.

          I propose to count all the occurences, and historize this value to see its evolution through time : if it increases too quickly or too much, I will need explanations from developers.

          Show
          JoŽl Iviglia added a comment - No. In SONAR-1322 , the suggestion is to enable/disable it, or detect its use as a violation. I propose to count all the occurences, and historize this value to see its evolution through time : if it increases too quickly or too much, I will need explanations from developers.
          Hide
          Freddy Mallet added a comment -

          Hi JoŽl, the first step is going to implement a new Sonar rule in order to detect //NOSONAR occurrence. With this rule, it'll be easy to create a new Sonar Plugin to count the number of occurrences and follow this number over time.

          Show
          Freddy Mallet added a comment - Hi JoŽl, the first step is going to implement a new Sonar rule in order to detect //NOSONAR occurrence. With this rule, it'll be easy to create a new Sonar Plugin to count the number of occurrences and follow this number over time.
          Hide
          Evgeny Mandrikov added a comment -

          Initial implementation of rule added in r6044.

          Show
          Evgeny Mandrikov added a comment - Initial implementation of rule added in r6044 .
          Hide
          Evgeny Mandrikov added a comment -

          FYI Joel : next version of Taglist plugin will provide this metric - SONARPLUGINS-842.

          Show
          Evgeny Mandrikov added a comment - FYI Joel : next version of Taglist plugin will provide this metric - SONARPLUGINS-842 .

            People

            • Assignee:
              Olivier Gaudin
              Reporter:
              JoŽl Iviglia
            • Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: