SonarLint CLI and viewing only New issues

65 views
Skip to first unread message

christine...@gmail.com

unread,
May 9, 2017, 7:06:52 PM5/9/17
to SonarLint
I saw a note saying that no future development is planned for SonarLint CLI, is that correct? I don't see an official word on that.

We have developers who develop using IDEs other than the three supported SonarLint IDEs. It looks like the supported solution is to use SonarLint. Is there a way for SonarLint to show only New issues? 

Thank you!
Christine

Illia Svyrydov

unread,
Jul 18, 2017, 2:12:23 AM7/18/17
to SonarLint, christine...@gmail.com
Hi here,

+1 from me for only newly intorduced issues compared to Leak period.

Here is the story:

1. Project exists for some period of time and already has technical dept and issues
2. The team decided to do quality control with  Sonar, but in two forms:
2a. with analyzing current master on every merge to track what happens and see nice charts
2b. with adding an actual code quality gate. if change request introduces new issue reject it to merge. This part is going to be based on sonarlint
3. So as result it is expected to have some number of not solved issues, failure if new were introduced with new change request
4. The team will eventually solve all issues (let us hope so), but will not create new ones

From CLI point of view, it could look like

sonarlint --src "src/**" --tests "src/tests/**" -u --new-from-leak-period --max-new 0

--new-from-leak-period  - compares current report with latest available on SonarCube for leak period
--max-new N                 - fails the build (exit code != 0) if new issues count is > 0 

Please share your view. Probably it could be achieved in another way.

Do you think it is possible to add to the roadmap and implement?

Thank you and have a nice day,
Illia Svyrydov

christine...@gmail.com

unread,
Jul 18, 2017, 3:38:54 PM7/18/17
to SonarLint, christine...@gmail.com
This is almost exactly what we are desiring. We have a backlog of SonarQube issues which should notify but not block the commit at the quality gate.  We are desiring to only block on New, Blocker issues.

Thank you!
Christine

Ilya Sviridov

unread,
Jul 18, 2017, 8:06:24 PM7/18/17
to christine...@gmail.com, SonarLint
Hello Christine,

According to my understanding how SonarQube works, the report and quality gate decision are done asynchronously on the server.

So we have considered it as not suitable for blocking functionality and switched to sonarlint, as working synchronously on build environment and returning report instantly.
The only thing left is to make a decision if change request should go or not.

And here we see some kind of duplication: one quality gate on the server and another here in SonarLint.

Ideally, if SonarLint could not only load rules and plugins from SonarQube, but also Quality Gate thresholds and apply them locally during build, it would be possible to use it rung out of the box.


Illia

--
You received this message because you are subscribed to a topic in the Google Groups "SonarLint" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarlint/qcv5hEJjHqM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/cfc20dcc-ebaf-4777-a95b-8b13bcc0b734%40googlegroups.com.

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



--
With best regards
Illia Svyrydov
Reply all
Reply to author
Forward
0 new messages