I was assigned to use SonarQube for code quality. But while I'm downloading it's plugin to Eclipse I understood it is deprecated and new one is SonarLint.
But as so far I couldn't find any good documentation to how to use SonarLint. How to check java project using that. I only got touch with Youtube videos. But sadly they are really really unclear to me.
If can direct me to a good place to gain clear knowledge on this I'll be really grateful to you.
You can install SonarLint from the Eclipse Marketplace and read the official SonarLint documentation
If you want to analyze a complete project with the Sonar Lint plugin, you can trick the plugin by searching all Java files with a text editor and replacing "package" with " package". This will cause SVN or git changes. Open the "Sonar Lint Report" view and run the analysis on the "Current project". Afterwards, revert all your SVN changes. Do not run the analysis again as the Sonar Lint Plugin only analyzes changed files.
I found this helpful when I had no project on the Sonar server available.
You can install SonarLint as described by Sumit Singh.
Then you can link your project to a sonarqube server as described here
After that just make a change and save it. Sonarlint will automatically analyze the project for you. Cause analyzing is enabled by default (as far as i know)
Related
I'm setting up a Sonarqube Developer Edition server and am trying to use the license-checker plugin I got from:
https://github.com/porscheinformatik/sonarqube-licensecheck
The plugin's jar is deployed to the correct directory and I have created a new Sonar way (license) Java profile that inherits the profile Sonar way (Built-in). In the new profile, I added the "License is not allowed" and "Dependency has unknown license" rules the plugin requires to work. I tested with a Java project and it works flawlessly.
I tried the same approach for the Kotlin profile Sonar way (license) I created and that inherits the Sonar way (Built-in) profile. But these rules are not available to Kotlin and, thus, the License check plugin does not run when I attempt to analyze a Kotlin project.
This seems to be a Java-specific plugin, but I might be mistaken. Is there a way to get this working I am not realizing?
Long story short, the plugin does not support my scenario.
Long story, my question was not clear enough and I failed to put some information as I was learning about this build myself. The project is in Kotlin and uses gradle to handle dependencies. The plugin only supports maven and NPM builds. So, for my to achieve the desired result, I would need to extend the plugin to handle the build.gradle.kts file. This task is a very big question mark in itself, so I will be looking at another alternative for the time being.
I came across a Maven project which has Groovy files in it. Those Groovy files were not getting recognized during initial compilation. So, I added groovy libraries in build path.
Due to that, when autobuild is triggered it shows the following error window:
Also, I am not able to decompile the dependent jars and all the projects went into error state.
I tried restarting my eclipse and it asked me to install the following plugins:
When I click on install, it prompts me the following error window:
I am not sure if reverting back all my changes of adding Groovy libraries is a good idea! Any leads on handling this situation will be appreciated.
It sounds like you added the Groovy Development Tools to eclipse. GDT patches the Java Development Tools (and provides LanguageSupportFactory class mentioned above). If you use the incorrect version of GDT to patch JDT, eclipse can end up in a very bad state.
I recommend looking at Help > About Eclipse Platform > Installation Details > Installation History. You can revert to a previous state where GDT was not installed. If you want to add back GDT, be sure you use the update site that matches the version of eclipse you are using.
I am using the GAMA framework for agent based modeling, which relies on Eclipse Indigo SR2. I was not sure if this was a GAMA issue or an Eclipse issue, so I am posting to both the GAMA help as well as Stackoverflow.
So I am using Eclipse Indigo Modeling Framework and I cannot seem to load the .product file for the Plugin. Whenever I try and load it, it just shows "unable to open editor" in the Product Configuration Editor window. There is really no message or error indicated, so I am not sure how to debug this one. I thought I might be missing a plugin, but it seems that the GAMA svn project will download all of the plugins necessary. Any suggestions would be appreciated. I have included a picture to demonstrate the issue.
Figured this one out. In this case, you need to click on the Java perspective before it will work. So the omission was simply changing the perspective. Good lesson though.
I have two coexisting installations of eclipse on my machine. One is the plain eclipse and one is STS (Spring Source Tool Suite). For some strange reason (which would be too tedious to explain here) I have to use the plain eclipse. However, I want to import, use some of the plugins that already exist in STS.
Is there a way I can go about achieving this?
If you don't want to scan the filesystem for the plugins, the easier solution is to go to Help -> About Eclipse -> Click on "Installation Details". That should provide you all the installed plugins in Eclipse.
It is possible to install the STS-specific bundles into vanilla Eclipse. You need to follow the instructions outlined here:
http://dist.springsource.com/release/STS/doc/STS-installation_instructions.pdf
Look at the section called "Update site installation".
I am banging my head against a mess of JNI code and DLLs that we are trying to shoehorn into an OSGi bundle. It has been particularly hard to get good debugging info out of the system and I have spent too much time stepping through raw byte code trying to infer what is happening inside equinox--when I really don't care--I am just not getting useful errors out. It would be great if I could have easy access to the equinox source in the debugger to see why and where it was loading what.
The simple answer of downloading all the source and building my own Eclipse would be one solution, but it feels very heavy handed. Is there a "grab source" repo I could go to and install from or some such thing?
It just feels like there should be an easier way to go about this. Something akin to using the debug libraries or installing the SRPM in another situation.
Eclipse ships with source by default, look for *.source in the plugins folder, it could be you just need to set up the source path in the debugger.
If you actually don't have the source, getting it will depend a little on what version of eclipse you are running. For Galileo or Helios you can try going to Help -> Install New Software. Work with the Galileo (or Helios) repository. Uncheck "Group items by category", in the filter type "source". In particular, most of the equinox source will be in "Eclipse RCP Plug-in Developer Resources".
Alternatively you can also go to the Equinox download page and get the Equinox SDK which has the source.