SonarLint is a free static analyzer installed as an IDE plugin or extension. It reports suspected problems directly in the editor and can analyze a whole project or a selected package. section 1.3.2 section 1.3.1
Incorrect shift amount
int value = 1; int result = value << 32; Shifting an int by 32 bits has no effect in Java, making the operation a likely mistake. SonarLint underlines it in Eclipse or Visual Studio Code and lists the problem for inspection. section 1.3.2
Use SonarLint to:
- Install the plugin through Eclipse Marketplace or the Visual Studio Code extensions view. section 1.3.2
- Read a rule description, deactivate a rule, or inspect warnings in the Problems view. section 1.3.2
Figure 1.2 The Eclipse IDE with the SonarLint plugin installed shows a warning about an int value being shifted by 32 bits.
The Eclipse warning view shows how SonarLint presents the incorrect shift directly in the editor. section 1.3.2
