The documentation includes general guidance on adding coding rules, including which languages support adding custom rules, and general guidance on how to go about it.
If the docs don’t answer your question, please tell us:
- What language are you writing rules for? HTML
- What have you tried, and what’s your challenge / stumbling block
Hello, I’m looking to modify the Sonar rule SonarQube. I want to have it detect as a valid th as well (we have a custom component that acts as a th). I read on the Sonar docs that custom HTML rules are not supported.. is there anyway to implement a custom rule for this? I’ve tried to use the existing sonar-html-plugin and make a custom rule using the existing rule, but it seems the classes aren’t available for use this both when compiling and on our Sonar Server with latest version of sonar-html-plugin (3.19.0.5695):
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@522a32b1-org.sonar.server.rule.registration.RulesRegistrant': org/sonar/plugins/html/checks/AbstractPageCheck
Is there really no way to create Web/HTML Java rules? It seems like if I just had access to the internal classes it would be possible.