How to change Sensor name of self developed Sonar

2019-09-02 04:21发布

after a while now I finished the development of my own SonarQube plugin nearly. How my plugin works and what it does is is not important so far. I just want to change one last thing.

How can i modify the name of my Sensor? I mean that one which is shown in Jenkins (my build environment) when the Sensor gets used. I want to show there only "Sensor ProjectKeyChecker..." or something like that if it possible :)

Here is an example output of Jenkins:

[INFO] [15:12:27.723] Sensor org.sonar.plugins.projectkeychecker.ProjectKeyCheckerSensor@79aa11...
[INFO] [15:12:27.786] Project exists already on Sonar. Key check is unnecessary.
[INFO] [15:12:27.786] Sensor org.sonar.plugins.projectkeychecker.ProjectKeyCheckerSensor@79aa11 done: 63 ms

Thank you all :)

1条回答
贼婆χ
2楼-- · 2019-09-02 04:35

IIRC, you just have to implement the #toString() method.

查看更多
登录 后发表回答