Enable more IntelliJ inspections #2827
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
We recently created a repository-wide, project-level inspection profile,
which allows us to share and synchronize the inspections used across all
contributors. This works well, but the inspection profile we created was
based on the IntelliJ defaults, which is intentionally conservative
(i.e., does not enable most inspections). We should take advantage of
more of the very helpful inspections that IntelliJ offers, since they
can help improve code quality, and IntelliJ's static analysis recognizes
many issues that SonarQube does not.
Description
This change enables most inspections that I personally feel offer value,
as well as setting them to the severity-level (i.e. weak vs strong
warning) that I personally feel is appropriate. Whether an inspection
offers value is obviously highly subjective, but this change allows us
to bias towards increasing our overall visibility to potential issues.
Over time, if we feel certain inspections do not offer value, we can
then selectively tune or disable those.
License