sonarqube

Sonar, QAPlug, IntelliJ Integration - Multiple profiles?

谁说胖子不能爱 提交于 2019-12-11 05:53:27
问题 I've set up a Sonar installation on our build server so that we can maintain reporting on our coding rules compliance, code coverage, etc. What I want to do is maintain this Sonar installation as the main source of our checkStyle, findBugs and PMD rules. Sonar supports this by letting you modify the rules its using and export them. I can then import these rules to developer machines running IntelliJ Idea with the QAPlug plugin. The problem is that I have to import profiles individually. Which

Exclude some lines of php code from sonarqube analysis

戏子无情 提交于 2019-12-11 05:28:11
问题 Is there a way to exclude some lines of code from sonarqube analysis without excluding the whole source code file? Maybe with an annotation or something like this? I'll give you an concrete example, where i need to exclude a certain code smell for an unused function parameter: I implemented a validation method like this: public function validateTruth(string $attribute, $value) : bool { $acceptable = [ '0', 0, 'false', false, '1', 1, 'true', true, 'no', 'yes', ]; return in_array($value,

Can SonarQube notification email quantity be reduced via batching?

烈酒焚心 提交于 2019-12-11 05:24:28
问题 We've been doing a bunch of bulk fixing of issues in our codebase (deprecated code usage, mostly) and every time the analysis kicks off next, everyone gets 10-100-1000 individual emails detailing the status changes that occurred. Is there any way to consolidate all this information into a single email so users don't end up being unable to tell what's going on due to sheer bulk of repetitive information? I really don't want to have to turn off the notification emails and implement my own email

Sonar 6.x LTS release schedule

醉酒当歌 提交于 2019-12-11 05:22:50
问题 We would like to upgrade our Sonar setup to 6.x but waiting for LTS release. Is there any update on when Sonarqube LTS (6.x) release is scheduled? Also, we would like to understand major differences between Sonarqube 4.5.7 & Sonarqube 6.x in terms of support for Java/maven/msbuild/fxcop versions and other major features that 4.x users should be aware of. 回答1: The release of 6.7 LTS is planned for this fall. But you cannot upgrade directly from 4.5.7 to 6.7; you must first go through the

SonarQube multi-module and multi-sub-folder project configuration

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 05:20:32
问题 I have a multi-module sbt project with the following structure: parent/ child1/ src/ group/ child1/ src/ child2/ src/ I need to configure SonarQube to scan all of the modules in (possibly) nested folders. Note: I have child1 and group/child1 modules, which makes "flattening" all modules not possible. In build.sbt I use names like: val `group-child1` = (project in (file("group/child1"))) val `child1` = (project in (file("child1"))) With a flat multi-module structure it would be easy to

sonarqube how to access to default technical debt pyramid values from web service api?

帅比萌擦擦* 提交于 2019-12-11 05:07:11
问题 Im trying to access to default technical debt pyramid values, the chart that appears on dashboard, using the web service api that sonarqube provide. I don't have SQALE plugin installed, i just need those default values. there is any way to access to these values using the web service api?. Thanks. 回答1: Values in the technical debt pyramid was the amont of technical debt for each characteristics. As characteristics have been removed in SonarQube 5.5, I would not recommend you to try to use

SonarQube java.lang.ClassCastException: ParametrizedTypeJavaType cannot be cast to ParametrizedTypeJavaType

女生的网名这么多〃 提交于 2019-12-11 05:01:48
问题 I am trying to make my own SonarQube rule, the objective of the rule is to check that I am not using the contains method on a collection of a specific object. Example with Integer Object : List<Integer> a = new ArrayList<>(); a.contains(1); // Noncompliant To do that I am trying to get the ParametrizedTypeJavaType. Then I will be able to test if it is an Integer or not ... @Override public void visitNode(Tree tree) { MethodInvocationTree methodInvocationTree = (MethodInvocationTree) tree;

SonarQube: How to configure leak period start every X days

孤人 提交于 2019-12-11 04:54:35
问题 I'm Using SonarQube 5.6.5 and trying to configure it so that the Leak Period is starting every x (=21) days. Our sprints are running 21 days so I want the differential view is showing the changes since last sprint start. I get this only if I manually change each sprint start the 'Leak Period' to the date of the sprint start. Is there a more convenient way to do so? 回答1: Fixing the Water Leak (paradigm at the core of SonarQube features/UX) is about making sure that your software quality does

Sonar complaining about useless assignment of local variable

烂漫一生 提交于 2019-12-11 04:49:25
问题 I have the following piece of code in my program and I am running SonarQube 5 for code quality check on it after integrating it with Maven. However, Sonar is asking to Remove this useless assignment to local variable "session". @RequestMapping(value = "/logoff", method = RequestMethod.GET) public String getLogoffPage(HttpServletRequest request, HttpServletResponse response) { logger.info(" Before Log Offf........ " + request.getSession().getId() ); HttpSession session =request.getSession(true

Sonarqube Branch does not exist on server

纵然是瞬间 提交于 2019-12-11 04:17:21
问题 When I try to analyze my project using sonar-scanner, the scan fails with the following error message: Caused by: Branch does not exist on server: develop Apparently, this only happens when it analyzes a Pull Request from GitHub. I could reproduce the error, when I add the following configuration to sonar-project.properties : sonar.branch.name = source-branch sonar.branch.target = target-branch What could be the cause for this problem? 回答1: I solved the problem by deleting my Sonar project