JAM-Software / SonarDelphi

This repository contains the source code to the Sonar-Delphi plugin. Can be used to analyse Delphi projects with SonarQube.
31 stars 12 forks source link

ConstructorWithoutInheritedStatementRule should not match for class constructors #2

Closed joachimmarder closed 2 years ago

joachimmarder commented 3 years ago

inherited class constructors are called anyway as part of the initialization section of their unit.

joachimmarder commented 3 years ago

First add a test case to src\test\java\org\sonar\plugins\delphi\pmd\ConstructorWithoutInheritedStatementRuleTest.java and make sure it fails.

joachimmarder commented 2 years ago

Unit for testing: Unit1.zip

x3ntrix commented 2 years ago

@joachimmarder: The provided example it for issue #11, and not this one.

joachimmarder commented 2 years ago

Sorry @x3ntrix, I picked the wrong file. I have now updated my comment.