Closed amedee closed 4 years ago
Hello. Thanks for reporting the issue. You seem to have updated something: what was it? Can you explain what was the state of SQ before you tried to install the plugin so that I can try to reproduce the issue.
Thanks
Sent with GitHawk
Previously I had version 2.1.0 of the plugin installed. I reinstalled version 2.1.0 of the plugin, by downloading the jar file from GitHub, copying it into the extensions directory and restarting SonarQube -> no error.
Then I delete the 2.1.0 jar, download the 2.2.0 jar and restart SonarQube -> error, as seen above.
I'll have a look at the commits between 2.1.0 and 2.2.0 to see if I can help you identify a possible cause.
\xF0\x9F\x9A\xA7
is the UTF-8 code for the "construction sign" emoji, see https://graphemica.com/%F0%9F%9A%A7
When using MySQL as a database, one runs into issues with such Unicode emojis, this blog post describes the issue: https://mathiasbynens.be/notes/mysql-utf8mb4 One could call it a known bug in MySQL's Unicode implementation. I know about this obscure MySQL bug because I have also experienced in Jira: our customers can't log a ticket when their issue description contains an emoji (what we internally call the "moneybag problem", because we first encountered it in a support question from a customer who wanted to use the moneybag emoji but they couldn't log their support request).
Anyway, long story short.
Are you aware of any 🚧 emojis that you may have introduced in your code between commits e41d75d (release 2.1.0) and dabc700 (release 2.2.0)? Because that would be the most likely cause. When SonarQube loads your plugin, it tries to insert the rules descriptions into its database (hence the for column 'description'
in the error). MySQL chokes on a Unicode character in one of the descriptions, returns an error, which fails the plugin upgrade, and causes SonarQube startup to abort.
If you can help me identify the file that contains the problematic unicode character, then I am willing to make a local build of your plugin, try it out in our SonarQube, and then submit a pull request.
I found the culprit by cloning your repo and naively doing
grep --color='auto' --line-number "🚧" --recursive src/
I got this:
src/main/resources/org/sonar/l10n/shellcheck/rules/shellcheck/SC1090.html:15:<h2>🚧 In <a href="https://shellcheck.storage.googleapis.com/index.html"><code>shellcheck-latest</code></a></h2>
ffa76a9 introduced 🚧, I'll leave a comment on the commit.
I'm now going for a lunch break, I'll make the change and submit a PR this afternoon.
Hello,
Thanks for the investigation. I use a tool to write the HTML pages for the rules from the Shellcheck wiki. It appeared that I was not lucky when I built the pages: my generator processed the page https://github.com/koalaman/shellcheck/wiki/SC1090/cdc5988e45b09135f68073f8b7fdec92d6f58c86, which contains the emoji. Sorry about that.
Now the page is fine so I'm going to release a new version as well as updating my generator to warn about emojis. It should be released next week.
I just installed release 2.2.1 from the Github release, I can confirm that it works. Thank you!
When I upgrade the plugin in SonarQube to 2.2.0, I get this error in
web.log
:It is definitely from the shellcheck plugin, because the error goes away when I delete the plugin's jar and restart SonarQube.
SonarQube version: 7.7.