SonarCloud knows how to scan Java 15 code and report issues related to text blocks

Hello Java developers,

Java 15

We upgraded the SonarCloud Java analyzer so that it can scan your Java 15 code. Java 15 is available since September 2020 and some of you already adopted it and were eager to scan their Java 15 code on SonarCloud. This is now possible.

New Rules dedicated to JEP 378 Text Blocks

For each new feature in a programming language there are risks of mistakes. This is why we added these rules to help you better use of Text Blocks:

  • S5663: Simple string literal should be used for single line strings
  • S5664: Whitespace for text block indent should be consistent
  • S5665: Escape sequences should not be used in text blocks
  • S6126: String multiline concatenation can be replaced with a Text Blocks

Note that S2973 and S1192 were also improved to support Text Blocks.

For SonarQube users, this will be included in SonarQube 8.7.