SonarQube & salesforce.com New lightning UI

661 views
Skip to first unread message

Amneet Padda

unread,
Apr 15, 2016, 9:11:44 AM4/15/16
to SonarQube
Can we scan lightning UI code in SonarQube without any issue if yes how can we acheive that ??


G. Ann Campbell

unread,
Apr 15, 2016, 9:25:54 AM4/15/16
to SonarQube
Hi,

Just so you know, people tend to get testy if you leave off the niceties like "Hello" and "Thanks". Cross-posting here and on StackOverflow will also raise people's dander, although since you waited nearly a full day in between it's less likely to happen in this case (although a little longer window might have been better). However, it's unfortunate that you gave so little detail here, especially when you were more forthcoming on Stackoverflow.

Perhaps you'd like to fill in a little more detail? Your SO post mentions HTML, HTML5, and jQuery. Maybe you could give or link to a code sample?


Ann

Amneet Padda

unread,
Apr 18, 2016, 7:05:31 AM4/18/16
to SonarQube
Hi ,

We are working on SonarQube Enterprise implementation and we have couple of projects which use Salesforce.com. 

Salesforce.com have added a new Lightning User Interface to Salesforce ( let me refer it as SLUI)

We need to check whether we can scan the code through SonarQube or not.

The SLUI is based on AURA framework which is developed using JAVA and JavaScript. SLUI implemntaion has limited salesforce as well as Aura feature and not all of them.

SLUI development is divided in Components(.cmp) and Events(.evt) . Components are written in Aura context with HTML and HTML5 tags embedded and Events are in Javascripts with Aura tags embedded.

Can we scan the code through the SonarQube or not. 

link below shows exampl of the Aura Component present in Javascript :

Below an example of Component Source code :
01<aura:component>
02    <aura:attribute name="text" type="String" default="Just a string.  Waiting for change."/>
03    <input type="button" value="Flawed HTML Button" onclick="alert('this will not work')"/>
04    <br/>
05    <input type="button" value="Hybrid HTML Button" onclick="{!c.handleClick}"/>
06    <br/>
07    <ui:button label="Framework Button" press="{!c.handleClick}"/>
08    <br/>
09    {!v.text}
10</aura:component>
 
Let me know in case any further information is required.

Could we effectively scan the code of SLUI through SonarQube

Thanksin Advance!!! 

Pierre-Yves Nicolas

unread,
Apr 18, 2016, 7:29:55 AM4/18/16
to Amneet Padda, SonarQube
Hi,

SonarQube plugins have no knowledge of these specific frameworks.
The Java and the JavaScript plugins can only analyse files which have a valid standard syntax.
You should try analysing a project which uses these frameworks and come back when you have more precise questions.

Regards,
Pierre-Yves


--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/2d57c1b8-7d6c-4076-826d-36f916573805%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

b...@villagechief.com

unread,
Jan 19, 2017, 11:01:19 PM1/19/17
to SonarQube
Hi Amneet,

It's not clear what plugin you intend to use this with, but I'll just mention that the CodeScan plugin for SonarQube is able to handle aura files (along with apex and visual force). Please head over to our website and you can try it out and send any support queries to the appropriate CodeScan support forum there.

The JavaScript elements can be managed by SonarQube's JavaScript plugin. 

Regards
Ben
Reply all
Reply to author
Forward
0 new messages