Uploaded image for project: 'Rules Repository'
  1. Rules Repository
  2. RSPEC-5307

All if … else if constructs shall be terminated with an else clause

    Details

    • Type: Code Smell Detection
    • Status: Active
    • Resolution: Unresolved
    • Labels:
    • Default Severity:
      Minor
    • Impact:
      Low
    • Likelihood:
      Low
    • Default Quality Profiles:
      MISRA C++ 2008
    • Covered Languages:
      C++
    • Remediation Function:
      Constant/Issue
    • Constant Cost:
      2min
    • Analysis Level:
      Syntactic Analysis
    • Analysis Scope:
      Main Sources, Test Sources

      Description

      This rule is a strict implementation of a MISRA (Motor Industry Software Reliability Association) rule. MISRA defines best practices for developing safety-critical software. You can learn more about this rule in the MISRA documents referenced below.

      If you are not concerned with MISRA compliance or with safety-critical software, you might consider using rule ElseIfWithoutElse instead ; it targets the same kind of issue for general-purpose software.

      See

      • MISRA C++2008, 6-4-2

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                loic.joly Loïc Joly
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: