Skip to content

Enable a static code analyzer for null-checking and other common issues #1247

Open
@bashir2

Description

@bashir2

We have experimented with some static code analyzers like SonarQube (e.g., in #704, #706, #707) but these are not adequate, especially for catching NullPointerExceptions. Also we have some @Nullable annotations throughout the code but we don't have a robust null-check static code analyzer that can benefit from these annotations. With release 1.0.0 of Jspecify it makes sense to move our null-check annotations to Jspecify and enable a tool like NullAway on our code. This requires Error Prone which will help catching more issues at compile time.

An early experiment shows over 370 ErrorProne/NullAway warnings, so we should probably fix this issue in multiple phases (e.g., by module).

Metadata

Metadata

Assignees

Labels

P2:shouldAn issue to be addressed in a quarter or so.enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions