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

NullPointerException #45

Open
nilleb opened this issue Apr 13, 2016 · 5 comments
Open

NullPointerException #45

nilleb opened this issue Apr 13, 2016 · 5 comments

Comments

@nilleb
Copy link

nilleb commented Apr 13, 2016

2016-04-11T10:02:50.7167593Z ##[error]Caused by: java.lang.NullPointerException
2016-04-11T10:02:50.7167593Z ##[error]at org.sonar.plugins.delphi.DelphiSensor.parseFiles(DelphiSensor.java:200)
2016-04-11T10:02:50.7167593Z ##[error]at org.sonar.plugins.delphi.DelphiSensor.analyse(DelphiSensor.java:107)
2016-04-11T10:02:50.7167593Z ##[error]at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58)
2016-04-11T10:02:50.7167593Z ##[error]at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:50)
2016-04-11T10:02:50.7167593Z ##[error]at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:98)

This is an excerpt of the log of the sonar-runner execution, for a project which doesn't include any Delphi sources. The sonar-runner is being invoked through the TFS vso-agent-task SonarQube Post Test

2016-04-11T10:00:35.8735554Z SonarQube Runner 2.4
2016-04-11T10:00:35.8735554Z Java 1.8.0_45 Oracle Corporation (64-bit)
2016-04-11T10:00:35.8735554Z Windows Server 2012 R2 6.3 amd64
2016-04-11T10:00:35.8735554Z SONAR_RUNNER_OPTS=-Xmx1024m
2016-04-11T10:00:35.8735554Z INFO: Error stacktraces are turned on.
2016-04-11T10:00:35.8735554Z INFO: Runner configuration file: d:\TfsData\_work\6\.sonarqube\bin\sonar-runner\bin\..\conf\sonar-runner.properties
2016-04-11T10:00:35.8735554Z INFO: Project configuration file: d:\TfsData\_work\6\.sonarqube\out\sonar-project.properties
2016-04-11T10:00:35.9828704Z INFO: Default locale: "fr_FR", source code encoding: "UTF-8"
2016-04-11T10:00:35.9828704Z INFO: Work directory: d:\TfsData\_work\6\.sonarqube\out\.sonar
2016-04-11T10:00:36.2040890Z INFO: SonarQube Server 5.3
@nilleb
Copy link
Author

nilleb commented Apr 13, 2016

I must admit that the dpk/dof/cfg/dpr files being analyzed (in the context above) are not valid ones. These are test files, almost empty. I realize that the problem could just be that the DelphiProject returns a null array when getting the files of a fake (empty) project file.

@nilleb nilleb changed the title NullPointerException with SonarQube 5.3 NullPointerException Apr 13, 2016
@nilleb
Copy link
Author

nilleb commented Apr 13, 2016

Are Delphi 7 projects supported by this plugin ? (dpk/dpr)

@cesarliws
Copy link

I'm using Delphi XE3, XE7 and Seattle 10 and I'm having hard time with projects files like .dproj.

IDE autogenerated files should not be analysed.
Project files may be used only to select which files should be analysed.

.dproj is a XML files with includes, build profiles, platform target profiles, etc, all nodes are duplicated and the plugin is categorizing this nodes as duplicates.

@nilleb
Copy link
Author

nilleb commented Apr 13, 2016

I have no dproj. I just have empty (truncated to 0B) or invalid dpk files in the project being analyzed. These files are test files used by a C# unit test project.

@SandroLuck
Copy link

SandroLuck commented Jul 29, 2016

add this line to your
sonar-project.properties
sonar.exclusions= *.dpr, *.dpk, *.dproj

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

3 participants