SonarQube Social Sciences

From TSG Doc
Revision as of 08:58, 26 November 2026 by E.salimov (talk | contribs) (Default page standard information)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The SonarQube Social Sciences server provides automated source code analysis and code quality management for software development projects within the Faculty of Social Sciences at Radboud University.

SonarQube Social Sciences
Developer(s)SonarSource
Installed version26.9.0.129388
PlatformLinux (Ubuntu Server)
LicenseSonarQube Community Build
WebsiteSonarQube Social Sciences
Downloads
Manuals

SonarQube analyses source code to identify potential bugs, security vulnerabilities, code smells, and other issues that may affect the quality, maintainability, and security of software projects.

The service is self-hosted and managed by the Technical Support Group (TSG). It can be integrated with GitLab Social Sciences to automatically analyse code as part of a project's development and CI/CD workflow.

Features

SonarQube helps developers continuously monitor and improve the quality of their source code. By analysing code automatically, it provides insights into potential problems before they become more difficult or expensive to resolve.

The main features include:

  • **Code Quality Analysis:** Detect bugs, code smells, and maintainability issues in source code.
  • **Security Analysis:** Identify potential security vulnerabilities and security hotspots.
  • **Quality Gates:** Evaluate projects against predefined quality criteria and indicate whether the code meets the required standards.
  • **Project Management:** Create and manage individual projects to monitor code quality over time.
  • **Code Coverage:** Display test coverage information when coverage reports are generated and supplied by the project's testing tools.
  • **GitLab Integration:** Integrate SonarQube into GitLab CI/CD pipelines to automatically analyse code during development.
  • **Issue Tracking:** Review detected issues, assign priorities, and monitor their resolution.

SonarQube supports various programming languages and development environments. The available language support and analysis capabilities depend on the installed edition.

Unlike cloud-based code analysis services, SonarQube Social Sciences is hosted on infrastructure managed by Radboud University. This allows the TSG to manage the configuration, availability, and access to the service.

Requirements

To use SonarQube, the following requirements apply:

1. **Access to SonarQube:** You need access to the SonarQube Social Sciences server. 2. **A SonarQube project:** A project must be created or made available to you before you can analyse its source code. 3. **SonarScanner:** To analyse source code locally or through an automated pipeline, you need a compatible SonarScanner installation or scanner integration. 4. **Project token:** For automated analysis, a project-specific analysis token is required. This token is used to authenticate the scanner against the SonarQube server.

For GitLab projects, SonarQube can be integrated into the project's CI/CD pipeline using GitLab CI/CD variables to securely store the required configuration and authentication token.

Login and Access

SonarQube Social Sciences is accessible through:

https://sonarqube.socsci.ru.nl

Access to the server requires an account with the appropriate permissions.

If you require access to an existing project or need a new project to be created, contact the Technical Support Group (TSG).

Project administrators can manage project-level permissions and generate analysis tokens for use in their development pipelines, subject to their assigned permissions.

Setup, Configuration and Usage

Creating a Project

Projects in SonarQube provide a central location for analysing and monitoring the quality of source code.

Once a project has been created, developers can configure the analysis process and connect it to their development environment.

Each project has its own project key, which is used to identify it during code analysis.

Integrating with GitLab

SonarQube can be integrated with GitLab Social Sciences to automatically analyse source code whenever a CI/CD pipeline is executed.

This integration allows developers to monitor code quality without having to manually initiate an analysis each time.

The general setup consists of the following steps:

  1. Create or obtain a SonarQube project.
  2. Generate a project analysis token in SonarQube.
  3. Add the token as a CI/CD variable in the corresponding GitLab project.
  4. Configure the SonarScanner in the GitLab CI/CD pipeline.
  5. Execute the pipeline to submit the analysis report to SonarQube.

Once the analysis has completed, the results can be viewed through the SonarQube web interface.

For more information, consult the official GitLab integration documentation.

SonarScanner

SonarScanner is the component responsible for analysing source code and submitting analysis reports to the SonarQube server.

It can be used locally or as part of an automated CI/CD pipeline.

For GitLab integration, the scanner is typically executed as a job within the project's .gitlab-ci.yml configuration file.

The scanner communicates with the SonarQube server and submits the generated analysis report for processing.

For installation and configuration instructions, see the SonarScanner documentation.

Quality Gates

Quality Gates allow projects to be evaluated against predefined quality conditions.

A Quality Gate determines whether a project meets the required code quality standards based on the results of its analysis.

For example, conditions can be configured to evaluate:

  • New bugs.
  • New vulnerabilities.
  • Code coverage.
  • Duplicated code.
  • Maintainability issues.

If a project does not meet the configured conditions, its Quality Gate will fail.

This allows developers to identify potential problems early and maintain consistent quality standards throughout development.

Frequently Asked Questions

What is SonarQube used for?

SonarQube is used to analyse source code and identify potential problems relating to code quality, security, and maintainability.

It helps developers detect issues early in the development process and maintain a consistent standard across their projects.

Which programming languages are supported?

SonarQube supports multiple programming languages.

The available languages and their analysis capabilities depend on the installed SonarQube edition.

For an overview, consult the official language documentation.

Can I integrate SonarQube with GitLab?

Yes. SonarQube Social Sciences can be integrated with GitLab Social Sciences.

By configuring SonarScanner in a GitLab CI/CD pipeline, projects can be analysed automatically whenever the pipeline is executed.

For more information, see the GitLab Integration section above.

Do I need to install SonarQube on my computer?

No. SonarQube is hosted centrally on a server managed by the TSG.

You only need a compatible scanner or scanner integration if you want to submit code analyses.

The results can be viewed through the SonarQube web interface.

Are my projects and source code publicly accessible?

No. Access to projects is controlled through SonarQube permissions.

Projects and their analysis results are not automatically made publicly accessible.

Only users with the appropriate permissions can access a project's information.

Can I use SonarQube for research data?

SonarQube is intended for analysing source code and related development files.

It is not intended as a storage platform for research data, datasets, or other large files.

Research data should be stored using the appropriate university storage facilities.

Who manages the SonarQube server?

The SonarQube Social Sciences server is hosted and maintained by the Technical Support Group (TSG).

The TSG is responsible for server maintenance, software updates, configuration, and the general availability of the service.

For technical questions or problems, contact the TSG.

Troubleshooting

If you encounter problems when analysing a project, first check the following:

  • Verify that the SonarQube server is accessible.
  • Check whether the project key is configured correctly.
  • Verify that the analysis token is valid and has the required permissions.
  • Check the SonarScanner configuration and GitLab CI/CD variables.
  • Review the GitLab pipeline logs for scanner errors.
  • Check the SonarQube project interface for the status of the submitted analysis.

If the problem persists, contact the Technical Support Group (TSG).

Known Issues

GitLab CI/CD Integration

Analysis failures can occur when the scanner is unable to communicate with the SonarQube server or submit its analysis report.

Possible causes include incorrect authentication tokens, insufficient permissions, network connectivity issues, or server-side configuration restrictions.

Analysis Report Upload

Large analysis reports may encounter upload restrictions imposed by the web server or reverse proxy.

If an analysis fails during report submission, contact the TSG and provide the relevant GitLab pipeline logs.

External Links