Continuous Inspection

Overview

SonarQube Build Status Quality Gate Status

Continuous Inspection

SonarQube provides the capability to not only show health of an application but also to highlight issues newly introduced. With a Quality Gate in place, you can Clean As You Code and therefore improve code quality systematically.

Links

Have Question or Feedback?

For support questions ("How do I?", "I got this error, why?", ...), please first read the documentation and then head to the SonarSource Community. The answer to your question has likely already been answered! ๐Ÿค“

Be aware that this forum is a community, so the standard pleasantries ("Hi", "Thanks", ...) are expected. And if you don't get an answer to your thread, you should sit on your hands for at least three days before bumping it. Operators are not standing by. ๐Ÿ˜„

Contributing

If you would like to see a new feature, please create a new Community thread: "Suggest new features".

Please be aware that we are not actively looking for feature contributions. The truth is that it's extremely difficult for someone outside SonarSource to comply with our roadmap and expectations. Therefore, we typically only accept minor cosmetic changes and typo fixes.

With that in mind, if you would like to submit a code contribution, please create a pull request for this repository. Please explain your motives to contribute this change: what problem you are trying to fix, what improvement you are trying to make.

Make sure that you follow our code style and all tests are passing (Travis build is executed for each pull request).

Building

To build sources locally follow these instructions.

Build and Run Unit Tests

Execute from project base directory:

./gradlew build

The zip distribution file is generated in sonar-application/build/distributions/. Unzip it and start server by executing:

# on linux
bin/linux-x86-64/sonar.sh start 
# or on MacOS
bin/macosx-universal-64/sonar.sh start
# or on Windows
bin\windows-x86-64\StartSonar.bat 

Open in IDE

If the project has never been built, then build it as usual (see previous section) or use the quicker command:

./gradlew ide

Then open the root file build.gradle as a project in Intellij or Eclipse.

Gradle Hints

./gradlew command Description
dependencies list dependencies
dependencyCheckAnalyze list vulnerable dependencies
dependencyUpdates list the dependencies that could be updated
licenseFormat --rerun-tasks fix source headers by applying HEADER.txt
wrapper --gradle-version 5.2.1 upgrade wrapper

License

Copyright 2008-2021 SonarSource.

Licensed under the GNU Lesser General Public License, Version 3.0

Comments
  • External issues with project scope

    External issues with project scope

    As with "normal" issues it should be possible to create external issues that belong to the project instead of a single file.

    There are cases where an issue can not be assigned to a location in a file. E.g. because it is not known where the issue occurred, e.g. when fuzzy testing the application.

    opened by tobiasstadler 12
  • Update environment.rb for Oracle optimizations

    Update environment.rb for Oracle optimizations

    Instead of using a SELECT to fetch sequence #, assign value directly from the sequence; it would lower cursor usage for people with tight DB restrictions and could improve performance by up to 50% based on this: http://oracle-base.com/articles/11g/plsql-new-features-and-enhancements-11gr1.php#sequences_in_plsql_expressions.

    However it would only be compatible with Oracle 11g and up, but Oracle 10g (even R2) was dropped from even extended support for almost 2 years. If support for Oracle 10g must be kept, perhaps a support for specific dialects like "Oracle9g", "Oracle10g", "Oracle11g" and "Oracle12c" would be necessary (a bit like Hibernate does although they stopped at 10g).

    opened by sberthiaume 12
  • add db migration from java

    add db migration from java

    This PR adds a component that wraps around the ActiveRecord based migration process and handles concurrency as well as asynchronous execution of it

    this will be called from the new WS to trigger DB migration (another PR)

    Sorry this PR is a little bit dense, but individual commit do not really make sense

    opened by sns-seb 12
  • Implemented writeTimeoutMs

    Implemented writeTimeoutMs

    In some cases when Sonar's Analysis Report is big enough, the upload process is failing with a Session timeout error. This happens on big multimodal projects when analysis reports more than 1Mb. Given that nowadays=, many IT people working from home and the connection bandwidth varies a lot, in many cases, the default 10-sec write timeout inherited from OkHttp is not enough.

    opened by seaman333 11
  • Do not warn if the file is excluded already

    Do not warn if the file is excluded already

    This change is only about excessive warnings in the console. We have thousands of these comments in our project because we have a certain folder that is shared between projects.

    Even when I exclude the unnecessary files with Sonar, this continues to Log them.

    opened by tasomaniac 11
  • add module concept

    add module concept

    this PR introduces the concept of module as a group of components this will allow reducing length of the ComponentLevel classes and in the near future implement lazy start of components and/or description of implicit component dependencies this PR also includes a few module to demo usage and as a proof-of-concept

    opened by sns-seb 9
  • SONAR-6376 better Java WS to list installed plugins

    SONAR-6376 better Java WS to list installed plugins

    This PR :

    • changes the WS response to use a root object so that the response can be easily extended in the future (best practice)
    • adds more properties to the WS response for each plugin
    opened by sns-seb 9
  • SONAR-6366 new ws for db migration

    SONAR-6366 new ws for db migration

    this PR adds the new WS server/migrate

    IT tests coming up as soon as I know how they are supposed to be written

    this PR is based on branch feature/add_db_migration_from_java reviewed with PR #197

    opened by sns-seb 9
  • Enable parallel execution of web tests

    Enable parallel execution of web tests

    On my machine this change decreases time of execution of web tests on 68%, which is 43% for build of web module and 8% overall as shown below.

    $ uname -p -m -o
    x86_64 Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz GNU/Linux
    

    Before:

    $ time mvn clean install -pl server/sonar-web
    [INFO] Casper Task 'casper:test' took ~67805ms to run
    real    1m46.001s
    user    1m7.538s
    sys     0m2.216s
    
    $ time mvn clean install
    real    8m23.034s
    user    9m17.843s
    sys     0m20.167s
    

    After:

    $ time mvn clean install -pl server/sonar-web
    [INFO] Casper Task 'casper:test' took ~21746ms to run
    real    1m0.827s
    user    1m15.891s
    sys     0m3.304s
    
    $ time mvn clean install
    real    7m40.100s
    user    9m52.647s
    sys     0m22.536s
    

    I'm not a JavaScript expert, but seems that there is no problem of isolation of tests. At least I did not observed spontaneous failures among 20 sequential runs.

    Default value of "concurrency" level (5) seems good enough - on my machine higher values do not provide further decrease of time.

    opened by Godin 9
  • Fix SAML check feature using Tomcat Proxy configuration (https://tomcโ€ฆ

    Fix SAML check feature using Tomcat Proxy configuration (https://tomcโ€ฆ

    Hi,

    To me, correction of ticket SONAR-13328 seems buggy. It only checks HTTP header X-Forwarded-Proto but behind a reverse proxy hostname is frequently changed too and header X-Forwarded-Host could be sent.

    If Sonarqube is installed behind a reverse-proxy, I think it's better to customize Tomcat than hack incoming HTTP request (https://tomcat.apache.org/tomcat-9.0-doc/proxy-howto.html).

    So in this PR I add 3 new properties to configure RP :

    • sonar.web.proxyName : reverse proxy hostname
    • sonar.web.proxyPort : reverse proxy port
    • sonar.web.scheme : reverse proxy incoming scheme

    When this properties are filled, Tomcat will return information about the original HTTP(S) request when getRequestURL() is called (by SamlResponse for example).

    opened by Ripolin 8
  • SONAR-6724 : support analyzing root pom in multi-modules projects

    SONAR-6724 : support analyzing root pom in multi-modules projects

    This PR allows processing of files in aggregator modules. When analyzing a multi-modules maven project, this allows the root pom to be indexed and analyzed. It should also be beneficial to other project types (Gradle was mentioned in SONAR-6724). This only applies to files, not folders : SONARPLUGINS-2295 introduced a warning for existing folders referenced in property sonar.sources of aggregator modules : it will still be displayed, and these folders will still be ignored.

    planned 
    opened by lbndev 8
Releases(9.8.0.63668)
Owner
SonarSource
Continuous Code Quality
SonarSource
Concourse is a container-based continuous thing-doer written in Go and Elm.

Concourse: the continuous thing-doer. Concourse is an automation system written in Go. It is most commonly used for CI/CD, and is built to scale to an

Concourse 6.7k Jan 7, 2023
Distributed and fault-tolerant realtime computation: stream processing, continuous computation, distributed RPC, and more

IMPORTANT NOTE!!! Storm has Moved to Apache. The official Storm git repository is now hosted by Apache, and is mirrored on github here: https://github

Nathan Marz 8.9k Dec 26, 2022
Manage your continuous commit history beautifully โญ

โญ ์Šคํƒ€๋ฅผ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š” ๊ฐœ๋ฐœ์— ํฐ ๋„์›€์ด ๋ฉ๋‹ˆ๋‹ค! โญ๏ธ English ์—ฐ์†๋œ ์ปค๋ฐ‹๊ธฐ๋ก์„ ์•„๋ฆ„๋‹ต๊ฒŒ ๊ด€๋ฆฌํ•˜์„ธ์š” ์ปค๋ฐ‹์„ ๋Š๊ธฐ์ง€ ์•Š๊ณ  ์—ฐ์†ํ•ด์„œ ํ•  ๊ฒฝ์šฐ ์ˆซ์ž๊ฐ€ ์˜ฌ๋ผ๊ฐ‘๋‹ˆ๋‹ค. ํ•˜๋ฃจ๋ผ๋„ ์ปค๋ฐ‹์„ ์•ˆํ•˜๋ฉด ์ˆซ์ž๊ฐ€ 0์œผ๋กœ ์ดˆ๊ธฐํ™” ๋ฉ๋‹ˆ๋‹ค. ์•„์ด๋””์–ด๋‚˜ ๋ฐœ๊ฒฌ ํ•œ ๋ฒ„๊ทธ๊ฐ€ ์žˆ๋‹ค๋ฉด ์ œ๋ณด ํ•ด์ฃผ์„ธ์š” Co

xb205 33 Oct 11, 2022
IntelliJ plugin for continuous OpenAPI linting using the Spectral OpenAPI linter

Spectral IntelliJ Plugin This plugin is a wrapper for the tool Spectral, a linter for OpenApi schemas. It supports all Jetbrains IDEs starting at vers

Schwarz IT 19 Jun 6, 2022
Find solutions for the Cognizant Early Engagement Program [ Continuous Skill Development ].

Cognizant-Early-Engagement Early Engagement is a learning portal offered by Cognizant, where you can learn basic concepts of Java, Sql, Web Develepome

Saravana Kumar 176 Jan 3, 2023