SONARLINT CREATING A CUSTOM PROFILE FOR RUNNING SPECIFIC RULE

66 views
Skip to first unread message

mahima...@gmail.com

unread,
Sep 26, 2016, 6:16:10 AM9/26/16
to SonarLint
Hi All,

I'm trying to create a custom profile for running a specific rule scan on directory.

I want to run a console log check in all js files.

I have defined a following property in environment variables.
export -DSonar_PROFILE=D:\testProfile.json

testProfile.json
----------------------------
{"name":"Sonar way","ruleKeys":["ConsoleLoggingCheck","S2228"]}


The reported html file is showing all rules. am I missing any thing here. any pointers will be helpful.


Following is the log when I run sonarlint CLI

D:\test\bin>sonarlint.bat
D:\test\test\bin\..
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
INFO: Java 1.7.0_80 Oracle Corporation (64-bit)
INFO: Windows 7 6.1 amd64
INFO: SONARLINT_OPTS=-DSonar_PROFILE=D:\testProfile.json
INFO: Index files
INFO: 7 files indexed
INFO: 7 source files to be analyzed
INFO: 7/7 source files have been analyzed
INFO:

-------------  SonarLint Report  -------------

          12 issues (7 files analyzed)

          4 blocker
          3 critical
          5 major

-------------------------------------------


INFO: SonarLint HTML Report generated: D:\GScanOjetRules\Runnable Jar\test\test\bin\.sonarlint\sona
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 2.233s
INFO: Final Memory: 8M/118M
INFO: ------------------------------------------------------------------------


Julien HENRY

unread,
Sep 27, 2016, 2:57:41 AM9/27/16
to SonarLint, mahima...@gmail.com
Hi,

I'm sorry but I don't know what is this -DSonar_PROFILE=D:\testProfile.json

Have you seen this somewhere on our documentation?

Regards,

Julien
Reply all
Reply to author
Forward
0 new messages