16

for some one still looking for a answer like me (it took me few hours to resolve). Firstly, go to Quality Profiles Secondly: Select the profile you want then create a new copy of profile (if you already done this step before, go to the third step). Because Sonarqube does not allow us to change the root profile, so if you want to modify the rules set, you ...


5

Follow below steps to disable any rule in SonarQube: Login by admin Go to quality profile & Select java/php profile [whichever is appropriate to you] Enter the rule as key and Search Uncheck the box which will inactive the rule Run Sonar runner command once again to verify the modifications are working properly I have borrowed my answer from here


3

It is a false positive since as you say we trust that it is closed internally by the JdbcTemplate. SonarQube has the assumption that the block of code that constructs a PreparedStament is responsible for closing it. You can use the SonarQube UI to flag this particular issue as a false positive. If you always rely on JdbcTemplate closing your PreparedStament ...


3

Do you need to force the SonarQube to set the language to Kotlin?? As I remembered, the sonar.language is somewhat deprecated (correct me if I am wrong). Right now, it will automatically detect the language that you are using. That's why when you try to remove the sonar.language in your configuration and build again, it should work.


3

The Swift plugin is a commercial plugin and you need a licence to be able to analyze swift projects : https://www.sonarsource.com/products/codeanalyzers/sonarswift.html


3

On newer version of SonarQube (mine is 6.7.4): Go to http://localhost:9000/admin/settings?category=exclusions Scroll to Ignore Issues on Multiple Criteria Add Rule Key Pattern and File Path Pattern Save and re-scan


2

Here is the step-by-step procedure to perform the scenario: Setup a Jenkins server if already not using. Goto plugin-manager of Jenkins to install “SonarQube Plugin”. Goto “System-configuration” of Jenkins to provide “SonarQube” server’s details Create a Jenkins job and choose one source code management option (say git). Under build, add “Execute Shell” as ...


2

Regarding question 1: You could give the Warnings Plugin a try. Regarding question 2: Configure your SonarQube project, to have a Leak Period since "previous build" The SonarQube Leak Period specifies the time frame of your usual development cycle. Quality Gate conditions can be specified to be specific to that time frame, to enforce your quality to "get ...


2

There is no golden standard for code quality statistics. Also older Stackoverflow questions about code duplication shows these topics are very opinionated. What good or bad statistics are will also differ per product and its complexity. Some might need more comments and or duplicate code. I would not use sonarQube to just rate a project, but to use as a ...


2

You can do this in Administration -> Configuration -> Analysis Scope -> Restrict Scope of Coding Rules. You need to specify the code of the rule (without spaces) and a file path pattern to filter. If you use the maven standard **/src/main/** will work for you. For more information see the docs where it states that you can: ...exclude files/directories ...


1

So here are your answers : Author is coming from the SCM data. According to your "strange" authors, I suspect you are using git and anyone can configure his account with any name (https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) In order to correlate the assignees (SonarQube user) and the author (SCM account), as an administrator you can ...


1

How about an code review from an experienced senior developer, so that you can focus more on practical tips. Experience is incomparable to any tool at least in the current state of the tools. Having said that, currently for JavaScript , we use linter tools for static code analysis which comes as plugins/extensions in all major IDEs.


1

Try out https://docs.sonarqube.org/display/SONAR/Analyzing+Source+Code Other possible ways If coding guidelines and standard followed. Duplicate code. Coding guidelines followed. Design principle effectiveness .


1

The very basic essence of the term API is to provide an interface for external communication. That said, it is perfectly fine and possible to use your tests written in Java to test API endpoint given you respect the specifications (inputs, output). However, a good practice is to ensure consistency by documenting the API with Swagger for instance.


1

As per SonarQube documentation you have two options: a) in case you have forgot your admin password Execute this query on database for SonarQube to set password back to 'admin' for user admin. update users set crypted_password = '$2a$12$uCkkXmhW5ThVK8mpBvnXOOJRLd64LJeHTeCkSuB3lfaR2N0AYBaSi', salt=null, hash_method='BCRYPT' where login = 'admin' b) in ...


1

My SonarQube web-based instance has a menu "Administration" when I am logged in as the Admin users. On the Administration page there is dropdown "Security" which has the following items: Users Groups Global Permissions Project Permissions Permission Templates Here you can setup users and permissions, so yes you can use multiple user logins.


1

You already have something else on port 9000 that isn't sonar when you telnet in , it will need to be stopped before anything else can bind to that port. use losf to find out which process it is lsof -i:9000 for more info on lsof see this, its not installed by default on a lot of distros. https://debian-administration.org/article/184/...


1

SonarQube only accepts processed data, so you have to generate the data while running tests with a build-server (Jenkins in your case). From the SonarQube code coverage documentation: The Java Plugin is going to reuse reports and not generate them, so before trying to configure your analysis to import these reports, you need to be sure they are ...


1

The next step is to create a proof of concept. Setup cobol code repository Create example cobol code to test jenkins/sonarqube features Create cobol unit-tests Setup Jenkins Create job to pull cobol code Run any tests and generate code-coverage Push data to SonarQube Analyze results Manual: Analyze trends and set targets Automated: SonarQube can give ...


Only top voted, non community-wiki answers of a minimum length are eligible