gabrie-allaigre / sonar-gitlab-plugin

Add to each commit GitLab in a global commentary on the new anomalies added by this commit and add comment lines of modified files
GNU Lesser General Public License v3.0
713 stars 207 forks source link

Nullpointer Exceptions protected variables #194

Open ezienecker opened 5 years ago

ezienecker commented 5 years ago

If not USER_TOKEN is present the plugin throw a NullPointerException java.lang.NullPointerException at com.talanlabs.sonar.plugins.gitlab.GitLabApiV4Wrapper.createOrUpdateSonarQubeStatus (GitLabApiV4Wrapper.java:211).

It would be better if the plugin pointed out that this variable is missing.

After some research, I wonder if the user token is really optional. Maybe you get the project information without user tokens but at the latest when commenting on the commits you need the user token.

Can you confirm the behavior?