Enhancing Code Quality through SonarQube: A Clean Coding Approach
vThink Global Technologies Private Limited
We are a software company passionate about delivering strong, robust software solutions to our clients.
SonarQube is an open-source platform developed by Sonar Source to perform continuous inspection of code quality for automatic reviews through static analysis of code for bugs, code smells, and security vulnerabilities. It supports various programming languages, such as Java, C#, JavaScript, TypeScript, Python, and many others.
It showcases a dashboard related to the issues found in the codebase and metrics such as code duplication, complexity, and test coverage. Such tools are also incorporated well with various build tools like Maven, Gradle, and MS Build for easy integration into the software development process.?
It helps the teams maintain the quality of code, keep to the coding standards, and identify the potential problems at an early stage in the development cycle, which finally leads to better software maintainability and reliability.?
SonarQube Impact on Project
By leveraging these capabilities, SonarQube helps teams deliver software with higher code quality, reduced technical debt, and improved maintainability, ultimately leading to greater client satisfaction and trust in the delivered product.
Setup SonarQube
Step 1:
Install SonarQube
Step 2:
Download Java 17.0.6 windows x64 MSi Installer [path -> (c/ProgramFiles/java)]
Step 3:
SETUP ENVIRONMENT VARIABLES?
Setup a Java path named as:
Step 4:
[path ->(C:\sonarqube-9.9.1.69595\sonarqube-9.9.1.69595\elasticsearch\config\elasticsearch(yml file))] --> edit with Notepad++?
Step 5:
[path ->(C:\sonarqube-9.9.1.69595\sonarqube-9.9.1.69595\conf\sonar)] -->edit with? Notepad++?
Step 6:
[path ->(C:\sonarqube-9.9.1.69595\sonarqube-9.9.1.69595\bin\windows-x86-64)]??
Step 7:
Open the URL After configuring the local instance?
Login to https://localhost:9000.?
Using System Administrator Credentials
Step 8:
Click the Create New Project button.?
Step 9:
Click locally?
Step 10:
Run analysis on your Project
2. Choose your build tool
Step 11:
Run this command line->[dotnet tool install --global dotnet-sonarscanner] in the cmd prompt.
Step 12:
project path->C:\Users\vthin\OneDrive\Documents\GitHub\api?
Execute the scanner: run the given command lines one by one.?
Role of SonarQube in Enhancing Our Project
Overall, SonarQube has become an indispensable tool in our project, helping us deliver high-quality code to our clients consistently. It's not just a static analysis tool; it's a partner in our journey towards excellence in software development.?
?