I have a java project with a couple of layers. I want to define a rules for file naming convention in Sonar server, e.g. each file in package app.name.dao to have name like ClassNameDAO.java.
Is this possible with some of the tools which Sonar is using?
I don’t see any other option than creating a dedicated Checkstyle rule (http://checkstyle.sourceforge.net/writingchecks.html) which would be embedded into your own Sonar plugin.
Here is an example of such Sonar plugin defining a simple Checkstyle rule : https://github.com/SonarSource/sonar-examples/tree/master/plugins/sonar-checkstyle-extension-plugin