davidetaibi / sonarqube-anti-patterns-code-smells

GNU General Public License v3.0
22 stars 4 forks source link

Exception in Padl #8

Open davidetaibi opened 6 years ago

davidetaibi commented 6 years ago

Some projects always raise the same exception:

ERROR: Error during SonarQube Scanner execution padl.kernel.exception.ModelDeclarationException: An entity cannot inherit from itself at padl.kernel.impl.FirstClassEntity.addInheritedEntity(FirstClassEntity.java:137) at padl.creator.javafile.eclipse.astVisitors.VisitorSecondParsing.manageInheritance(VisitorSecondParsing.java:252) at padl.creator.javafile.eclipse.astVisitors.VisitorSecondParsing.visit(VisitorSecondParsing.java:550) at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:453) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2782) at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:212) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2711) at parser.wrapper.NamedCompilationUnit.accept(NamedCompilationUnit.java:36) at parser.wrapper.JavaParser.parse(JavaParser.java:87) at padl.creator.javafile.eclipse.CompleteJavaFileCreator.createModelFromSource(CompleteJavaFileCreator.java:129) at padl.creator.javafile.eclipse.CompleteJavaFileCreator.create(CompleteJavaFileCreator.java:113) at padl.kernel.impl.CodeLevelModel.create(CodeLevelModel.java:41) at it.unibz.sonarqube_plugin.CodeSmellsAntiPatternsSensor.execute(CodeSmellsAntiPatternsSensor.java:114) at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53) at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:57) at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:49) at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:78) at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:175) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128) at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:262) at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:257) at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:247) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128) at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47) at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:128) at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:118) at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:117) at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60) at com.sun.proxy.$Proxy0.execute(Unknown Source) at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233) at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151) at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123) at org.sonarsource.scanner.cli.Main.execute(Main.java:77) at org.sonarsource.scanner.cli.Main.main(Main.java:61) ERROR:

cuuzis commented 6 years ago

According to the stack trace you are using an old version of the plugin (from August). Please update it to the latest release. The issue has been fixed with https://github.com/davidetaibi/sonarqube-anti-patterns-code-smells/commit/594e2dbae4cb679ab2ccae108b06894a6286b23d.

I will add a unit test to cover failed execution, but no new release is necessary.