The right way to scan other files next to Java

Hi there,

I’m evaluating writing custom rules in a sonarqube plugin. I followed the tutorial and understand how to create rules on Java files, which works pretty well.
However, I need to read files next to the Java files, e.g. want to read

  • Manifest.MF to check certain conventions regarding OSGi
  • XML Files, because the dependency injection framework uses them (OSGi DS)
  • feature, we work with Cucumber together with Java, so I want to add custom rules on *.feature files

What is the best practice and best means to implement a custom scanner on those files? I’m aware that I might have to parse and interpret the contents of the files myself, but this is what I would expect.