Beyond Bugs: The Hidden Impact of Code Quality ( part 2 )??
Rowan Ibrahim
junior flutter developer | Project Manager | Google women TechMaker | flutter instructor | Tech Writer
Introduction?
As we mentioned in the last part about the importance of code quality and standards, today we will discuss tools to help measure it and visualize detailed reports about your code. Finally, we will learn some tips on how to improve our code. Let’s Start ??
??Table of content?
Tools Used to Measure Code Quality ??
In a world overflowing with data, numbers often speak louder than words. That’s why some tools can analyze your code for you, using proven methods and techniques to offer suggestions for edits and improvements.?
These tools also provide visualized reports and charts about your code.
They can integrate with version control systems like GitHub to access repositories directly or operate locally on your machine.
It’s an open-source quality management tool that detects various types of issues such as bugs, vulnerabilities, code smells, and security hotspots
It comes with built-in quality profiles designed for each supported language.?
SonarQube includes a feature called SonarLint, and you can add it to your code to analyze it locally. You can integrate SonarLint as a plugin within your IDE for real-time feedback.
How does it work?
Sonar Qube has some rules that are based on code quality standards. When you configure your project and download the sonar scanner, it starts to analyze your code, and then it takes roles from the Sonarqube server.
?Roles are based on software quality and clean code attributes that measure how your code is quality.
It applies for these roles in the scanned code, then it generates reports and shows them in your dashboard like this?
Here, he passed the code, but there are some issues that he needs to fix.
It produces details of each issue, where is it in your code and how to fix it.
Additionally, the CI/CD Pipeline can accommodate its implementation. If you are unfamiliar with what it is, that’s alright - you can utilize it independently.
To be honest, not all issues are true all the time, you just will read it and see what needs to be fixed.
You can install it on Windows, Linux,macOS, or with Docker, see the full documentation here https://docs.sonarsource.com/sonarqube/latest/
This excellent resource for understanding it?
It’s like Sonarqube but doesn’t offer detailed reports and doesn’t support all languages, you can see it from here?
This tool builds on the open-source project Code Maat to analyze every file and every commit in the repo and identify hotspots and churns.
?It generates visualized metrics, making it easier to decide where to focus on your quality improvement efforts.?
You can install the code scene IDE extension.
The dashboard generates visual reports about code health and identifies areas that require improvement.
领英推荐
It also provides an analysis summary for the repo number of commits, authors, code health, etc…..
You will find more data if you discover it, not all features are free, but you still can try some of them.?
Discover from here:?
It’s a security platform that focuses on helping developers find and fix vulnerabilities in their code, dependencies, containers, and infrastructure as code (IaC).
It scans code and makes reports of weak parts and how to fix it?
You can log in to the dashboard from here:?
????????https://snyk.io/
When you run it in the terminal, it will be like this:
As we say, it checks for code dependencies and containers but don’t make a full check for the security of the code, you should still review it manually.
?See full documentation and how to set up?
We don’t rely on these tools as a main source. You should make a code review manual continuously for your project and enhance the code as you can.
Tips to improve ??
You can learn more about this from here?????
I recommend reading this book. You will find more details and you will enjoy it :?
Conclusion ?
The responsibility of measuring code quality is standing for each developer in the project from the team lead, developer, and tester.
This will come from practice and experience. You can go to open-source projects, try to contribute to them, and see how can you maintain the code quality.?
Try to learn OOP, and SOLID Principles and read the clean code book. This will help you to enhance your code quality.
Remember, being a good software engineer isn’t just about delivering products, it’s about delivering high-quality software that stands the test of time.
This test Cases template sheet, you can use it in your project :?
https://docs.google.com/spreadsheets/d/11nAISjsWE7yVCiL-ihEp4rQ42-7-LeX9TsK03ofO4Z8/edit?usp=sharing
That's it! Start to check your Code Quality! Connect with me on LinkedIn and GitHub for more articles and insights. If you have questions, contact me.
Remember, "Later Equals Never." ??
Computer Vision Enthusiast | IT Student | Exploring AI & Machine Learning
2 个月???? ???????