Detect external js or css inclusion as an issue in SonarQube - sonarqube

I am using SonarQube Community Edition Version 9.7 (build 61563). Is there any way I can detect all external JS files (like from cdn) as issues?
I couldn't find any option to add such a rule.

Related

Missing C# Rules in SonarQubeversion 6.4

Earlier I was using SONARQUBE 5.5 and sonar-csharp-plugin-5.0 which was having 407 C# Rules. But now i have upgraded to SonarQube 6.4 with which sonar-csharp-plugin-5.10.1.1411 comes by default and it has only 229 rules. I tried using the older version of SonarC# plugin but it is not compatible with this SonarQube version. Is there any way I can get all the C# Rules in SonarQube 6.4
The "407 rules" number included all of the Roslyn-based analysis rules written by SonarSource and the approximately 230 rules implemented in the now-obsolete FxCop.
Support for the FxCop rules was split out into a separate plugin, so from version 5.4 onwards the SonarC# plugin only contains the Roslyn-based analysis rules implemented by SonarSource.
If you still want to use the legacy FxCop rules you can install the community plugin.
However, we have been re-implementing the most useful FxCop rules in the SonarC# plugin using Roslyn. The latest version (v7.1) of the SonarC# plugin now has 343 rules with more being added in each release.

Upgrade SonarQube from version 5.6.4 to 6.7.2

I want to upgrade SonarQube and I haven't done this before so I have few question. Please could you help me with them?
How can I find which edition is installed on my server?
How can I find if the installed version is licensed or not?
How can I upgrade from 5.6.4 to 6.7 LTS? Do you have upgrade guide for the same?
You can always find which version is installed by logging into the SonarQube web app and looking at the footer of the page or by going to Administration / System / System Info. If you for some reason can't log in to the web app, and installation folder name does not contain the version number as it does by default, look in the "lib" folder for a file that looks like "sonar-application-6.3.1.jar". That will tell you the version number as well.
Here are the general steps for upgrading, from the Upgrade the Server docs:
Download and unzip the SonarQube distribution of your edition in a
fresh directory, let's say $NEW_SONARQUBE_HOME
Manually install the
non-default plugins that are compatible with your version of
SonarQube. Use the Compatibility Matrix to ensure that the versions
you install are compatible with your server version. Note that the
most recent versions of all SonarSource code analyzers available in
your edition are installed by default. Simply copying plugins from
the old server to the new is not recommended; incompatible or
duplicate plugins could cause startup errors.
Update the contents of
sonar.properties and wrapper.conf files (in
$NEW_SONARQUBE_HOME/conf) with the settings of the related files in
the $OLD_SONARQUBE_HOME/conf directory (web server URL, database,
ldap settings, etc.). Do not copy-paste the old files. If you are
using the Oracle DB, copy its JDBC driver into
$NEW_SONARQUBE_HOME/extensions/jdbc-driver/oracle
Stop your old
SonarQube Server
Start your new SonarQube Server
Browse to
http://yourSonarQubeServerURL/setup and follow the setup
instructions
Analyze your projects (and compute your
Views|Portofolios|Application if you own the Enterprise Edition
product) to get fresh data
Before embarking on this, you will want to check out the intermediate upgrade notes for each version in order: 6.0, 6.1, 6.2, 6.3, 6.4, 6.5, 6.6, and 6.7.
Note that upgrade notes for versions after 6.7 are hosted at the new documentation site.

Sonarqube and code testing

I want to run sonarqube testing on my sonarqube server and want to see test result (test report) from my client machine without touching server.
How can I do that in case of multiple developers will push their code to test on sonar server and need to see test result from their local machine?
There is the http://www.sonarlint.org/ plugin available for eclipse, IntelliJ IDEA and Visual Studio. The plugins for first two IDEs support Java, JavaScript and PHP, the plugin for Visual Studio supports .NET code.
All three offer the Connected Mode which can "establish a connection to a SonarQube server (4.5.4+) and bind your [...] project to a SonarQube project."
This might help you depending on your development environment.

troubles with getting c# plugin 3.0 and resharper to work properly

we have upgraded to SonarQube 4.3 and C# plugin 3.0 but we are struggling to get the integration with resharper working.
Which version of the Reshaprer plugin shall be available for SonarQube 4.3?
In update center I find version 1.0 but when I look at the reshaper plugin documentation there shall be a version 1.1 available.
Can I upgrade to the resharper plugin to version 1.1 in any other way? I have tried to put the 1.1 jar file in the plugin directory but then SonarQube refuse to start due to missing dependencies.
The reason for wanting version 1.1 is that we need to use our own dotsettings file and this seems to not be available in version 1.0. We also can´t get the reuseReport mode to work at all with the current installed version. Even if we use “sonar.resharper.mode=skip” resharper is trigged in the analysis.
The situation is quite messy, there indeed was a ".NET ReSharper" plugin available in version 1.0 and 1.1. This plugin is only compatible with the .NET ecosystem 2.1.
C# 3.0 is only compatible with a "ReSharper" plugin, which only exists in version 1.0.
Please refer to the following documentation: http://docs.sonarqube.org/display/SONAR/ReSharper+Plugin
Indeed the ReSharper 1.0 plugin does not support reuseReport mode (and it is not planned to add it currently).
However, there are plans to be able to import/export DotSettings files from/to SonarQube quality profiles: https://jira.codehaus.org/browse/SONARPLUGINS-3738
Have also a look at the example project: https://github.com/SonarSource/sonar-examples/tree/master/projects/languages/csharp
Final note: The .NET ecosystem 2.1 is not compatible with SonarQube 4.3.

Subclipse RAD 7 cannot compare JS

I cant seem to compare two JS files (one edited locally and the latest version from the repository when doing Team Synch or Compare With) using Subversion in IBM RAD 7. I have used Subclipse as a plugin version 1.6.8.
I have totally downgraded to Subclipse 1.6.5 because my team mate's IDE (also RAD 7) is working fine on this subclipse version when comparing JS files.
I have also looked up and seems we have both the same version of RAD 7.
Frantically looked for solutions on the net and found nothing.
Sorry if this is the place to look for support. I was attempting to upgrade my RAD but darn the fix packs are so huge even for a little fixes (other fixes I mean)(shoo IBM).
Does anyone have a workaround?
I cant find the workaround so I just patiently downloaded the updates from IBM sigh.
Updating to RAD 7.5.5 fixes the problem

Resources