☁️CodeArts Check: Empowering Code Quality and Security

Zeynep Kucur
Huawei Developers
Published in
4 min readMay 31, 2024

🚀Let’s start with what CodeArts Check is…

Huawei CodeArts Check is a powerful tool designed to efficiently and accurately detect code issues early in the development process, improving development efficiency and product quality. Developed through the collaboration of over 40 PhDs in China, 50 global research experts, and 10+ teachers internationally, and continuously refined by 150,000+ Huawei developers, it scans an average of 50 billion lines of code daily. It supports mainstream programming languages and comprehensively analyzes code for readability, maintainability, security, reliability, testability, efficiency, and portability, integrating years of research and practical experience in code quality improvement.

CodeArts Check Functions

Introduction to CodeArts Check

Imagine you’re a developer tasked with ensuring the highest quality for your codebase. You start your journey by using CodeArts Check, a comprehensive cloud-based service designed to scrutinize every aspect of your code.

Identifying Coding Issues

First, you utilize the coding issue check function to identify issues in your code. By applying predefined rule sets, this feature helps you catch potential bugs and inconsistencies early in the development process.

Enhancing Security

Next, you’re concerned about the security of your application. The code security check feature becomes your go-to tool, using sophisticated rule sets to pinpoint security risks and vulnerabilities, ensuring your code is robust against cyber threats.

Maintaining Code Style

Maintaining a consistent style throughout your codebase is essential. With the code style check feature, you can verify that your code adheres to the selected style guidelines, making your code not only functional but also aesthetically pleasing and easy to read.

Assessing Code Health

To gauge the overall health of your code, you rely on the code health score. This comprehensive metric, automatically calculated based on alarm impacts, issue quantity, and code volume, gives you a clear picture of your code’s quality at a glance.

Managing Issues Efficiently

As you dive deeper into the issues flagged during checks, issue management tools help you manage and resolve these problems efficiently. You can sort issues by descriptions, status, check rules, file paths, and even get suggestions for fixes, streamlining your workflow.

Evaluating Code Complexity

Quality assurance is further enhanced by evaluating the cyclomatic complexity of your code. This function helps you assess the risk of code segments based on their complexity, guiding you to simplify where necessary to maintain maintainability and readability.

Measuring Valid Code Lines

When examining the size of your codebase, you use the NBNC (non-blank non-comment) metric to count the number of valid code lines, excluding blanks and comments, providing a more accurate measure of your code’s true size.

Reducing Code Duplication

Duplication can lead to maintenance headaches. The duplication rate report helps you identify and reduce code redundancy, ensuring that your codebase remains clean and efficient.

Scheduling Regular Checks

To ensure continuous code quality, you schedule regular checks using the scheduled check feature. You set up daily or weekly checks, balancing your coding tasks with periods of rest, keeping your workflow sustainable and your code pristine.

Receiving Check Notifications

After each check, check result notifications are sent out, informing you and your team of the results. This prompt communication allows you to address issues quickly and keeps everyone on the same page.

Supporting Multiple Languages

As a developer working on multiple languages, you appreciate the versatility of CodeArts Check. Whether you’re writing in Java, JavaScript, CSS, HTML, C++, Python, PHP, C#, TypeScript, Go, Lua, Rust, or Shell, this tool supports all these languages, making it a one-stop solution for your diverse projects.

Using the IDE Plug-in

For those moments when you’re deep in the code within your favorite IDE, the IDE plug-in of CodeArts Check is a powerful assistant. Available on VSCode, Intellij IDEA, CodeArts IDE, and Cloud IDE, the plug-in provides industry-standard checks, one-click code formatting, and automatic fixes. It monitors your code in real-time, protecting its quality during coding, merging, and version releases.

Opting for the Enhanced Package

Lastly, for enhanced security, you opt for the Enhanced Package of CodeArts Check. This package offers in-depth security checks, identifying risks and vulnerabilities beyond the standard checks. It covers advanced issues such as parameter value errors, encryption flaws, data verification issues, cross-function checks, cross-file checks, taint analysis, and semantic analysis.

Conclusion

With CodeArts Check, you have a comprehensive, efficient, and user-friendly toolset at your disposal, ensuring your code is of the highest quality, secure, and maintainable.

References

--

--