sonar-scala / sonar-scala

A free and open-source SonarQube plugin for static code analysis of Scala projects.

Home Page:https://sonar-scala.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Embed pr decoration assets as plugin resources

mwz opened this issue · comments

Apparently it's possible to embed images as plugin resources and have them exposed through SonarQube, so we should give that a try with the pr decoration severity images. See here where to find them.

Quoting the docs here:

If you need to serve static resources from your plugin such as images or JavaScript files, place them in a directory under resources named static (myplugin/src/main/resources/static). At runtime they'll be available from http://{server}/static/{pluginKey}/{file}.

While at first impression that sounds like a good idea. After thinking for a while, I doubt it will be useful for many people. For example in my company, our SonarQube servers are private and only reachable under certain ips. So, what would happen when reviewing the PRs? Probably the images won't load.
And I would think this is common for most private projects.

And for public projects (like this one) they probably are using sonarcloud. I wouldn't be surprised if that service blocks serving static files, but I really couldn't find any documentation about that.

You're making a good point @BalmungSan, I'll close this issue then and let's keep those assets public.