I was wondering if it is possible with the latest version of Sonar or through some plugin calculate the techical debt of an architectural violation (from a java project) like: "'X' class should be in com.domain.classes package" or "the class 'X' must extend the class 'Y' "? Or "The 'X' class must have a 'public static Y someAttribute' attribute"?
If there is no plugin for this, there is how to develop a plugin to automate this? I have read the documentation for the Java API, REST, how to develop a plugin and tried to code it, but have not found a way to do it.
The only way to do this is through the Commercial SQALE plugin, inserting manually the remediation costs of an extended Architectural Constraint, XPath, PMD and another similar rules.
Sonarqube answer: http://sonarqube.15.x6.nabble.com/Calculating-Design-Violations-Technical-Debt-with-SonarQube-td5022251.html