sonarqube

Java wildcard generic as return warning in Eclipse and SonarQube

北城余情 提交于 2019-12-18 15:09:29
问题 private List gridModel; public List getGridModel() { return gridModel; } Eclipse shows a warning: List is a raw type. References to generic type List should be parameterized. Changing the code to below will remove the warning private List<?> gridModel; public List<?> getGridModel() { return gridModel; } However the above code shows a Major pitfall error in SonarQube which says: Remove usage of generic wildcard type. Generic wildcard types should not be used in return parameters So how can I

How to get code coverage using postman test

ぐ巨炮叔叔 提交于 2019-12-18 14:47:00
问题 We have REST services created in RestEasy and running in wildfly server. We are running Postman test cases to test the Rest URLs. Is there a way to get a code coverage of the services when we execute postman test suite? We use SonarQube to analyse the code coverage. 回答1: I think no, a similar question was asked here: Generate Sonar code coverage report from Postman tests The original poster commented further down: In fact, after a bit of googling, as a work-around we could use remote Jacoco

Sonar properties files

一世执手 提交于 2019-12-18 12:59:27
问题 I have a project that has the following package structure src/main/proj -com.company.package -appName -morepackages -appVersion2 -morepackages sonar-runner.properties sonarBuild.sh sonar-runner-project2.properties sonarBuildProject2.sh As it stands, with the default properties file i can run the sonar report and it will generate a review for the whole project sonar.projectKey=KEY sonar.projectName=PROJNAME sonar.projectVersion=1.0 sonar.host.url=someurl #Path for sonar sources sonar.sources

Configure Sonar sonar.issue.ignore.multicriteria through maven

自古美人都是妖i 提交于 2019-12-18 12:24:38
问题 I'm using a local instance of Sonar without a centralized infrastructure. In order to keep the configuration of my project in the pom.xml, I want to configure the project through maven and not through the Sonar UI. For me this has the advantage of keeping things in one place and other developers don't have to configure their local Sonar instance, just unpack and play. The doc on howto configure the sonar.exclusions property through maven is readily available but the format for sonar.issue

SonarQube And SonarLint difference

陌路散爱 提交于 2019-12-18 10:58:24
问题 How exactly is sonarQube different from SonarLint ? SonarQube has a server associated with it and Sonar lint works more like a plugin. But what are their specific difference ? 回答1: SonarLint lives only in the IDE (IntelliJ, Eclipse and Visual Studio). Its purpose is to give instantaneous feedback as you type your code. For this, it concentrates on what code you are adding or updating. SonarQube is a central server that processes full analyses (triggered by the various SonarQube Scanners). Its

Does Sonar support multiple language in same project?

余生颓废 提交于 2019-12-18 10:39:59
问题 I am setting up Sonar for one of my projects which is a mix of Groovy and Java . I am able to configure the project separately for either of these languages but not together. Is there any way to do this? I tried this sonar.language = java,grvy but didnt work 回答1: UPDATE April 14th, 2014: Starting with SonarQube 4.2, multi-language projects are supported. This automatically happens when sonar.language is not set. See my sample project here: https://github.com/bellingard/multi-language-project

maven connecting to Sonar

江枫思渺然 提交于 2019-12-18 10:33:49
问题 I have maven installed on my local machine and I'm trying to test out Sonar installed on a remote box. I found a few post online to configure settings.xml (maven\config\settings.xml) and append a profile entry...which I did but does not work <profile> <id>sonar</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <!-- SERVER ON A REMOTE HOST --> <sonar.host.url>http://remotebox:9000</sonar.host.url> </properties> </profile> What is the cli way? I tried several

SonarQube and Lcov report Could not resolve file paths

时光毁灭记忆、已成空白 提交于 2019-12-18 05:04:30
问题 We are trying to make a SonarQube code coverage report for our angular application. We have used Karma to generate a code coverage report and import it into SonarQube analyzer. The SonarQube already has C# coverage for our project, now we want to add JavaScript code coverage as well. Teamcity calls, Karma and it creates a code coverage and put the lcov file and report files into src\Planning.Spa\Coverage\report folder. LCOV File TN: SF:E:/a03/work/bb52cb33e083fc9/src/Planning.Spa/Offer/app

Sonarqube is not registering any c# issues

。_饼干妹妹 提交于 2019-12-18 05:00:46
问题 Since last Friday (04/01/2016) we are using sonarqube in our company. Somehow one of our project's issues got all closed (without actually being fixed). And now the project doesn't get any issues back. we even deleted the project in sonarqube and restarted an analysis, this also gives no issues. We tried many different things to get the issues back (even making errors on purpose, but this also doesn't generate any issues in sonarqube) We are running the newest version of sonarqube (Version 5

Disable rule in sonar

此生再无相见时 提交于 2019-12-18 03:51:26
问题 I want to disable a rule from Sonar so it doesn't show the results in the web page. In my case I want to hide (or not capture) the results about trailing comments. Is it posible to configure it somewhere? Thanks. 回答1: You have to remove this rule in the quality profile that you are using to analyse your project. Please refer to the documentation that describes all this: Quality Profiles in Sonar. 回答2: The right way to do is to put something like this on sonar-project.properties file per