Thymeleaf templates are not indexed : you may want to add “src/main/resources” in the scanned files

Resolved myself.For anyone else simply add:-

<sonar.sources>src/main/java,src/main/resources/templates</sonar.sources>

to your POM.