sentry-java
sentry-java copied to clipboard
Add custom lint checks
Description
From the top of my head we could automatically detect the following potential problem that we point out in the PRs all the time:
- Using
withScopeinstead ofconfigureScope - Adding
finalkeywords everywhere (parameters, properties, etc.) - Adding @Nullable/@NonNull annotation everywhere (parameters, properties, etc.)
- Catching
Throwableinstead ofException, see #1806
There's probably more, so keep updating this issue when you got something in mind.
Let's have a look how much of an effort this is (e.g. using checkstyle for finals, using ? for NotNull/Nullable)