All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.delphi.rules.community-delphi.EmptyInterface.html Maven / Gradle / Ivy

There is a newer version: 1.12.1
Show newest version

Why is this an issue?

An empty interface declaration is superfluous as it defines no methods to implement.

How to fix it

Remove or populate the interface declaration.

If desired, it can be replaced with IInterface for the same effect:

type
  IRefCounted = interface
  end;

  TMyClass = class(TObject, IRefCounted)
    // ...
  end;
type
  TMyClass = class(TObject, IInterface)
    // ...
  end;

Note that this is not a recommended approach, as nothing on the object will be accessible through the interface.

Resources





© 2015 - 2024 Weber Informatics LLC | Privacy Policy