3

There are some methods in my application using Sonar Java API 4.2. But, I have upgraded to 5.6.1 and unable to implement the replacements for these methods.

  • org.sonar.api.resources.Project.path(); I tried using SensorContext.fileSystem().baseDir().toString() as a replacement. is the functionality same?

  • In org.sonar.api.batch.Sensor.analyse(Project project,SensorContext context), Project and SensorContext have been deprecated and I am looking at only 2 new methods in the new Sensor interface which are describe(SensorDescriptor descriptor) and execute(SensorContext context). How do I input the Project path as previously?

Please help! Thanks!

G. Ann - SonarSource Team
  • 22,346
  • 4
  • 40
  • 76
Dravidian
  • 339
  • 2
  • 9
  • 19
  • with a plugin on client side (implements PostJob) you can access the PostJobContext, with it you have tons of project properties, have you checked it ? – Maxence Lecointe Jun 06 '17 at 09:26

0 Answers0