Vue support

434 views
Skip to first unread message

abbyjo...@gmail.com

unread,
Jan 12, 2017, 5:55:45 PM1/12/17
to SonarQube
Is there currently a way to have single-file Vue components included for coverage and analysis by the JavaScript plugin?  These files end with a .vue extension and include three sections - a <template> section, <script> section, and <style> section.  I can generate the coverage report, but Sonar isn't picking up the files.

Simona Avornicesei

unread,
Jan 13, 2017, 2:34:33 AM1/13/17
to SonarQube, abbyjo...@gmail.com
Hi Abby,

You can set sonar.javascript.file.suffixes=vue such that files with .vue extension will be picked up by the javascript plugin.

All the best,
Simo

Elena Vilchik

unread,
Jan 17, 2017, 4:45:02 AM1/17/17
to SonarQube, abbyjo...@gmail.com
Hi,

Setting suffixes probably will help to import coverage, but be prepared that SonarJS will fail to parse JS in such a file and thus no analysis results (issues) will be provided.

Elena

jmx...@gmail.com

unread,
May 16, 2017, 1:09:16 AM5/16/17
to SonarQube, abbyjo...@gmail.com
https://github.com/SonarSource/sonar-javascript/issues/576

This issue says your request is in progress

Abby Jones

unread,
Oct 18, 2017, 10:16:19 PM10/18/17
to jmx...@gmail.com, SonarQube
That's fantastic - thanks for the update!

carlo.bo...@sonarsource.com

unread,
Oct 19, 2017, 12:33:01 PM10/19/17
to SonarQube
Hello Abby,
Maybe you have not noticed, that update was pretty old, .vue single file component support was implemented and released in SonarJS 3.1. I suggest you update to the latest version (currently 3.2) and have a try.

Cheers,

Carlo
Reply all
Reply to author
Forward
0 new messages