Sonar Lint eclipse plugin project report - sonarlint

I have sonar lint eclipse plugin installed on my eclipse. The plugin is working perfectly, however I need to run the sonar checks not only on a single file, but on the whole project.
I did my research and I learned that the CLI interface of sonar can achieve such thing and can even generate some HTML report, however for one reason or the other the documentation is not so obvious about it.
Any help or even a direction is very much appreciated.

In the IDEs, SonarLint focuses on analyzing files as they are edited, to catch issues as early as possible. The idea is to prevent new issues to be introduced, more than to detect existing problems.
SonarLint CLI is primarily designed to check the issues on projects that are not using the supported IDEs, before committing code.
Analyzing all files is not currently supported but it might be implemented later at some point. Currently, we are concentrated in making SonarLint for Eclipse as efficient as possible in analyzing code as it is edited.

Related

Setting up a Grails / Groovy Server Pages project on Visual Studio Code for MacOS

I have some HTML/CSS changes I need to make on an existing project for a client. I already cloned the repository on my machine but I'm not really sure how to set it up to view the changes locally.
I'm seeing lots of files with the .gsp extension and after some googling I discovered those files mean this is a Grails/Groovy Server Pages project, which I have zero experience with (I'm a Front End Developer btw)
I already located all the HTML/CSS code I need to change, so what I need to do is learn the basic commands to get the project running locally so I can view the changes after I make them before pushing to the actual repo.
Anybody has an idea on how to set these kinds of GSP projects up on Visual Studio Code for MacOS?
Any help would be very much appreciated!
I think the easiest approach for you would be to start Grails separately using the command prompt. Identify the version of Grails for your project, and follow the instructions from Grails to setup the dev environment.
Also, remember you probably also have some sort of database to install and initialize.

Sonarlint command line version dropped?

It would appear that Sonarsource has discontinued development on the command line instance of the sonarlint tool. The link to the page on the sonarlint website now returns a 404 and there is no mention of the product on the sonarlint website.
Does this mean that there will no longer be a command line version of sonarlint?
The reason that I am asking this is that I would like to implement a build process that runs static analysis of the code for developers and also as part of the CI process on our Jenkins server. Whilst this can be achieved using various other plugins (checkstyle, etc.) the decision to start using Squid rules and deprecating older checkstyle, findbugs, etc. rules in Sonar makes alignment of the build process with the outcome reported by Sonar difficult; there are some rules in squid that are not readily matchable. For this reason I was looking for a way for developers to run a local Sonar analysis which is the same as that which is run by Jenkins during CI. (This is basic build and development best practice to align the local developer build with that executed by the CI server).
Either the sonar preview mode or the sonarlint command line tool would have allowed our build to do this, but it appears that Sonarsource does not understand the value of the practice and has decided to no longer support (by on going development) either method, which, in my opinion is a mistake. I hope that by raising this question they may consider again whether and how to support Sonar analysis for developers that does not require and IDE or editor plugin. My preference for this would to remove the deprecation of the preview mode analysis in the sonar runner so that we can confidently create processes that rely on it.
The SonarLint CLI version is not developed nor supported anymore.
It will be dropped completely soon, please find more info here (post by a SonarSource representative):
https://groups.google.com/d/msg/sonarqube/WlALjVzp-OE/Ev3QpnaOBAAJ
You might go with Sonar Scanner:
https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner

Sonar complains that a project is already defined in SonarQube but not as a module of project

After upgrading from SonarQube 5.1.2 to SonarQube 5.6, we started facing the below issue.
ERROR [o.s.s.c.t.CeWorkerCallableImpl] Failed to execute task AVX_lJ9fzEKnCGDDOpXH
org.sonar.api.utils.MessageException: Validation of project failed:
The project 'X' is already defined in SonarQube but not as a module of project "Y". If you really want to stop directly analysing project "X", please first delete it from SonarQube and then relaunch the analysis of project "Y".
We haven't done any changes or refactored our code apart from upgrading. please let us know how to fix the issue.
Sharieff,
I had faced a similar situation in my project. For me it was the sonar.skippedModules property which was still mentioned in my pom.xml. Since this property is no more supported since SonarQube 5.5, SonarQube may have problems analyzing the modules as they already would have entries in the database.
Hope this helps.
Regards,
Anantha

Running another MSI through visual studio installer

I want to install MySQL installer msi with my setup.(MySQL installer has to install silently. I am using batch file in custom action to do this.)
However, the problem is that MySQL's msi cannot be run from within main setup.msi it gives out 1618 error(Another installation needs to be completed.) I would like to know an easy way around this.
Background info: MySQL installer unpacks the manifest which contains MySQLInstallerConsole.exe it is then called through another cmd command to install MySQL.
So all I am looking to do is to execute MySQL installer so that it unpacks the manifest. Later I would call the MySQLInstallerConsole.exe to install MySQL through custom action.
Just to mention even more possibilities- some my colleagues mentioned (VS bootstrapper, burn):
Just start writing a batch or script for calling the two MSIs after each other.
Always a good starting point maybe, if you have no experience with MSI.
Write your own mini setup.exe bootstrapper with 5 lines of code to do the above.
(To be more concrete in "Third party tools":) Buy InstallShield or Advanced Installer or InstallAware, this are the tools with ready GUIs to do such easy bootstrapping.
I would recommend the second out of them. Starting another MSI are only two clicks. Similar with the other. But there are BIG differences between the three, especially InstallAware is special.
! Mentioned "mini bootstrappers" of those tools are not as powerful as Burn or the others followed:
Buy the ready setup suite SetupFactory which can be used as a bootstrapper for MSIs.
Use the InstallShield "Suite" project type, if you buy the Premium Edition of InstallShield. Costs big bucks, but has a friendly user interface. I was successful using it before some years, but I had to work around a handful of bugs as always with IS (but I guess you will discover bugs with most tools. Way it is.)
There (again) Burn would come in handy, you could fix potential bugs or behaviours on your own here ...
Only it could take you more time in the beginning.
... Of course there may be more.
There isn't an easy work around. Windows Installer enforces a 1 installation at a time rule through the use of a mutex. You need to create a bootstrapper / chainer to serialize the installation of your packages. Visual Studio Deployment Projects don't support this. I'd suggest looking at Windows Installer XML (WiX) and it's Burn boostrapper / chainer engine.
The documentation is a bit sparse, but in the Visual Studio world the customized bootstrap is the Bootstrap Manifest Generator. The docs start here:
https://msdn.microsoft.com/en-us/library/ms165429.aspx
and there is an old article here:
https://msdn.microsoft.com/en-us/magazine/cc163899.aspx
but it's not clear how much info and support is available since setup projects were removed from setup projects and then restored.

How to execute a custom Eclipse Editor

I have created a graphical editor using Eclipse-GMF. So now I can create diagram files. What I would like to do is execute the diagram files by clicking the green button.
So basically I would like to create a custom run configuration for a plugin that I have created.
I would like the custom run configuration to launch an Eclipse-RCP application that will read the runned diagram. But when i choose my RCP application in the Run as product or Run as application it opens normally for about 20secs then it crashes...
So my question is how do i configure this correctly??
You should extend the org.eclipse.debug.launch* extension points to have your own launch configuration, launchers, launch tabs, etc.
I believe these crashes that you mention are related to this bug. The crash log is identical to the one you posted in your comment. From what I can see, the issue was with Eclipse Helios on Windows 7 when Mylyn is installed on the target platform. The bug report states that it's solved in 3.7 M7. See this comment on how to prevent your plugin from crashing the workbench. Hope that this helps :).