Our Team Journey With SonarQube and Qodana

Deyuna Rusmiland
5 min readMay 26, 2023

--

cover: https://www.monkeyuser.com/2019/a-qa-walks-into-the-office/

Hey, there! If you are into Quality Assurance. This is your sign to read this! ✨

Because it’s time for us to have a good-natured, detailed chat about something we all love yet occasionally despise — Software Quality Assurance (SQA). More specifically, let’s dive into the static analysis of program quality, where our trusted companions will be SonarQube and Qodana.

What is Software Quality Assurance?

Based on Simplilearn, Software Quality Assurance (SQA) is the ongoing process that ensures the software product meets and complies with the organization’s established and standardized quality specifications.

SQA ensures adherence to quality standards, involving aspects like requirements definition, software design, coding, source code control, code reviews, software configuration management, testing, release management, and product integration

Enter the Static Analysis

Within the SQA paradigm, the static analysis holds a position of immense significance. It’s like your keen-eyed, super-intelligent detective who examines the program code without running it. This detective, armed with their sharp intellect and static analysis tools, can identify a range of issues, such as:

  1. Coding Standards Violations
    Inconsistent naming conventions or indentation issues? Static analysis won’t let it slide!
  2. Potential Bugs
    Subtle issues in logic that might have been overlooked during manual code review can cause trouble down the line.
  3. Security Vulnerabilities
    Is there a security loophole that malicious hackers could exploit? The static analysis detective will spot it.

Enter the Heroes: SonarQube and Qodana

Our group project, aspiring, was an adventure with numerous ups and downs. So, I will introduce you to our hero: Two tools called SonarQube and Qodana. Let me introduce them to you!

#1: SonarQube

SonarQube, an open-source platform by SonarSource, is our first ship, equipped with the latest tech for continuous code quality inspection. It performs automatic reviews with static code analysis to detect bugs, code smells, and security vulnerabilities.

On our SQA adventure, SonarQube offered us a trove of features, including:

Multilanguage Support
It covers 27 languages, including Java, C#, JavaScript, TypeScript, C/C++, and Python—an essential feature for our diverse codebase.

Detecting Bugs and Security Vulnerabilities
SonarQube was our ever-vigilant lookout, spotting bugs and potential security leaks in our code.

Code Duplication Detection
It pointed out redundant code, making our software leaner and cleaner.

Continuous Code Quality Monitoring
SonarQube kept a constant watch on the health of our applications, making our life easier.

After your fix, all of your bugs, vulnerability, and code smell. You can finally see in your dashboard that your code is passed.

Despite SonarQube proving to be a complete and splendid tool for scrutinizing our main code branch, we, unfortunately, bumped into a roadblock — it fell short in supporting merge requests (or perhaps more accurately, our license did not extend to that functionality).

Our project called for a solution capable of diligently analyzing every modification put forth by the team, offering valuable feedback, and safeguarding the code quality before finalizing the merges. And it’s called Qodana!

#2: Qodana

Next up is Qodana, a product by JetBrains. It’s a modern clipper ship in the sea of SQA, combining the intelligence of JetBrains IDEs with the capabilities of CI/CD pipelines (Qodana, n.d.).

Qodana brought some distinct features to our SQA journey:

Multi-Aspect Code Analysis
Qodana surveys the code from various angles, scrutinizing correctness, project conformance, redundancy, security, and more.

IDE Integration
Its seamless integration with JetBrains IDEs made our developers’ lives easier.

Dockerized Solution
Its Docker-ready solution ensured an easy fit into our CI/CD pipeline, enhancing our continuous inspection capabilities.

A significant feature of Qodana is its ability to navigate through our software sans any need for building and deploying. It carries out code inspection directly on the codebase, which allows us to apply Qodana directly to merge requests, yielding insights into any modifications before they are assimilated into the main branch.

Upon completion of the static analysis phase, we have the capability to delve into the vulnerabilities and defects within our code, right down to the precise lines where Qodana spotted irregularities. Armed with a plethora of inspection mechanisms, Qodana adeptly zeroes in on specific issues, thereby ensuring that our software quality remains firmly in check.

The Impact

Integrating SonarQube and Qodana into our Continuous Integration/Continuous Delivery (CI/CD) pipeline felt like unlocking a secret navigation chart. Every commit to our Git repository triggered an automatic analysis, helping us navigate potential issues early, streamline our delivery process, and maintain a steady course toward our destination.

GitLab pipeline

Conclusion

Navigating through the vast ocean of Software Quality Assurance using static analysis tools like SonarQube and Qodana was an enlightening experience for our team. With their assistance, we improved our software quality, uncovered hidden bugs, optimized our code, and learned to appreciate the value of these tools in maintaining standard best practices.

So, fellow adventurers, remember that the quality of your code is as vital as the functionality of the software. With static analysis tools at your disposal, maintaining this quality becomes a smoother sail. Until our next shared adventure, keep your codes clean, your bugs minimal, and your spirits high!

And that’s a wrap, Thank you! 💖

I will appreciate your feedback 💬 & clap 👏.

If you want to collaborate, don’t hesitate to contact me at deyunarusmiland@gmail.com or through Linkedin

--

--

Deyuna Rusmiland

UI/UX designers for over a year and counting. Has an insatiable appetite for growth & constantly seeking new perspectives every day