jenkins-infra / plugin-health-scoring

This project aims to introduce a metric system to calculate the health score of each plugin within the Jenkins ecosystem and reflect the final scores on the Plugin Site for the plugin maintainers and users.

Home Page:https://plugin-health.jenkins.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`@Nonnull` and `@CheckForNull` replacement

alecharp opened this issue · comments

Description

Annotations @Nonnull and @CheckForNull (part of JSR-305) have been deprecated since 2016.
They should be replaced with SpotBugs annotation.

More detailed description can be find at https://www.jenkins.io/doc/developer/tutorial-improve/replace-jsr-305-annotations/.

Hi

Here I have to check only the SpotBugs annotation configuration like here:
https://www.jenkins.io/doc/developer/tutorial-improve/add-more-spotbugs-checks/#increase-spotbugs-checks?

or do I have to also check whether @Nonnull and @CheckForNull are not released in any code files? If I have to do this, I think I have to look for a library to read the annotations? I am not sure though.

Discussed the approach for this probe with @aneveux

I have to look for the following statements in the .java files:

import javax.annotation.Nonnull
import javax.annotation.CheckForNull