0

I need to add a new custom rule which will check if email is written anywhere in code. It should work for all languages but specially for PHP. I'm confused if I've to create a plugin for it or has to create a custom rule template. Any lead can be helpful. Thanks!

G. Ann - SonarSource Team
  • 22,346
  • 4
  • 40
  • 76
ÛmÄîr MÄlîk
  • 453
  • 2
  • 10
  • 23

1 Answers1

1

The list of languages that support custom rules is here. In general, you're not going to be able to enforce this for "all languages" but you should be able to accomplish this for PHP by creating a plugin and implementing your rule in Java.

G. Ann - SonarSource Team
  • 22,346
  • 4
  • 40
  • 76
  • Is there any other short way to accomplish it? I mean by creating rule or quality profile or anything from SonarQube dashboard? I have no idea about java language. I only require to check if there is email written then display it as error. – ÛmÄîr MÄlîk Oct 20 '16 at 14:32
  • Also I'm following this method to create plugin: http://docs.sonarqube.org/display/DEV/Build+Plugin...... but it always gives error when I try to build it. – ÛmÄîr MÄlîk Oct 20 '16 at 14:54