Details

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

      Description

      • Title
        Collapsible If statements
      • Description
        Several 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

      Example :

      if(condition1) {
        if(condition2){
            doSomething();
        }
      }
      

      should be replaced by :

      if(condition1 && condition2){
         doSomething();
      }
      
      • Violation message
        Those two 'if' statements can be consolidated.
      • Default severity
        Minor

      Part of Sonar Way quality profile

        Issue Links

          Activity

          Hide
          Fabrice Bellingard added a comment -

          Manually tested.

          Show
          Fabrice Bellingard added a comment - Manually tested.
          Hide
          Evgeny Mandrikov added a comment -

          Integration tests were updated.

          Show
          Evgeny Mandrikov added a comment - Integration tests were updated.

            People

            • Assignee:
              Evgeny Mandrikov
              Reporter:
              Freddy Mallet
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: