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

Track use of "NotImplementedException"

    XMLWordPrintable

    Details

    • Type: Finding Detection
    • Status: Active
    • Resolution: Unresolved
    • Labels:
      None
    • Message:
      Implement this method or throw 'NotSupportedException' instead.
    • Highlighting:
      Hide

      throw new NotImplementedException()

      Show
      throw new NotImplementedException()
    • Default Severity:
      Minor
    • Impact:
      Low
    • Likelihood:
      Low
    • Targeted languages:
      Python
    • Covered Languages:
      C#
    • Remediation Function:
      Constant/Issue
    • Constant Cost:
      1h
    • Analysis Scope:
      Main Sources, Test Sources

      Description

      NotImplementedException is often used to mark methods which must be implemented for the overall functionality to be complete, but which the developer wants to implement later. That's as opposed to the NotSupportedException which is thrown by methods which are required by base classes or interfaces, but which are not appropriate to the current class.

      This rule raises an exception when NotImplementedException is thrown.

      Noncompliant Code Example

      void doTheThing() 
      {
          throw new NotImplementedException(); 
      }
      

      Exceptions

      Exceptions derived from NotImplementedException are ignored.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              nicolas.bontoux Nicolas Bontoux (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: