Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EmptyInterfaceRule is falsely marked for a forward declaration #6

Open
crenan opened this issue Dec 15, 2022 · 1 comment
Open

EmptyInterfaceRule is falsely marked for a forward declaration #6

crenan opened this issue Dec 15, 2022 · 1 comment

Comments

@crenan
Copy link

crenan commented Dec 15, 2022

SonarQube gives me an EmptyInterfaceRule code smell for a forward interface declaration.
Example:

type
  IMyForwardIntf = interface; // <-- Sonar will mark this as EmptyInterfaceRule

  IMyInterface = interface
    function FuncX: IMyForwardIntf;
  end;

  IMyForwardIntf = interface(IMyInterface)
    ...
  end;

According to the Delphi documentation, forward declarations differs from full declarations like:

  IMyFwrdIntfDecl = interface; // Forward Declaration
  IMyFullIntfDecl = interface end; // Full Declaration
  IMyFullIntfDecl = interface(IOtherIntf); // Full Declaration
@Cirras
Copy link

Cirras commented Nov 17, 2023

Hi @crenan,

Forward declarations are handled properly by: integrated-application-development/sonar-delphi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants