Hello all!
I’m pretty new to plugin enhancement for SonarQube. I did some searching, but maybe I’m not looking for the right keywords. I’m hoping y’all can help me with a language sensing enhancement I’d like to make to a plugin I’m using.
So, our codebase has a lot of scripts with shebang lines and no file extensions. Is there a predicate or sensor that looks for matches in shebang lines for files? I’d like to specify some regex matches to map to the interpreted languages we use. If there already is something like that in the sonar API, would someone be kind and point it out, please?
If not, do y’all have any suggestions on where to add a sensor like that? I can extend the plugin we’re using and would like to. If someone could point me to which functions in the sonar API to override or extend, it would be extremely helpful. Thank you for any and all assistance you can provide!
Example shebang line:
#!/usr/bin/perl