Introduction
We are thrilled to announce that Sonar now supports the Dart programming language! It is available in an Early Access version for both SonarQube Cloud (Team and Enterprise plans) and SonarQube Server 10.7 (Developer Edition +).
This exciting development is set to empower Dart developers with the robust code quality analysis that Sonar is renowned for. Whether you're building mobile apps with Flutter or web applications, Sonar's comprehensive suite of tools will help you maintain clean and reliable code.
Why Dart?
After its relatively humble beginnings Dart has rapidly gained popularity in recent years, especially with the rise of Flutter, Google's UI toolkit for building natively compiled applications for mobile, web, and desktop from a single codebase. The language's expressive syntax, strong typing, and asynchronous programming capabilities make it a favorite among developers aiming for high performance and productivity. Sonar research shows that Dart/Flutter has 46% of the market of cross-platform development, and has seen growth rates of 50% over the last 3 years. This growth, coupled with Sonar receiving over 600 insights from our users requesting support for Dart, has resulted in the early access version we make available today.
Our approach - not reinventing the wheel
We wanted to deliver a solution that added real value to Dart developers. Our approach was to build upon the existing Dart linter and its rules, and overlay information about why the rule was flagging an issue, what the implications of the issue could be, and also how to fix the issue. In essence, taking the existing Dart rules and helping developers understand, learn and improve through the Sonar solution.
In addition, we also created our own unique rules, which currently make up around 10% of the total number of rules. See this example and screenshot below. We will continue to build upon these unique Sonar rules for Dart in the coming months.
Key Features of Sonar's Dart Support
Comprehensive Code Analysis: Beginning with a core set of Dart-specific rules, with plans to add more before the end of this year, Sonar analyzes your Dart code, identifying bugs, and code smells. This ensures that your code is not only functional but also maintainable.
Seamless Integration: Easily integrate Sonar into your CI/CD pipelines, allowing for continuous inspection of your Dart projects. This integration helps catch issues early in the development process, saving time and resources.
Detailed Reports: Receive detailed reports that highlight areas for improvement, helping you prioritize and address issues effectively. These reports are designed to be developer-friendly and provide actionable insights.
Code Coverage: Sonar solutions support reporting, monitoring, and visualizing code coverage, helping teams maintain high code quality standards. This enables teams to have clear visibility into untested areas and receive actionable insights with context. You can view the percentage of your codebase exercised by your tests for valuable insights into your code's health. They then guide you to areas of low coverage to make improvements.
Market Insights: Why Dart Developers Will Love This
The Dart ecosystem has seen significant growth, with a vibrant community and increasing adoption in various industries. According to recent surveys, Dart is among the top languages for mobile development, thanks to Flutter's popularity¹. Companies are increasingly looking for developers proficient in Dart, making it a valuable skill in the job market.
By integrating Sonar into your Dart projects, you can ensure that your code meets the highest standards of quality. This not only enhances your project's reliability but also boosts your team's productivity by reducing the time spent on debugging and maintenance. In short, Sonar’s solution for Dart will improve the quality of your Dart code whilst helping you understand, learn and improve your Dart coding skills.
Join the Community
We invite all Dart developers to join the Sonar community and take advantage of this new support. We are making this Early Access version available now and encourage you to share your feedback, contribute to discussions, and help us continue to improve our solution for Dart to better serve your needs.
Sign up for a free trial of SonarQube Cloud, or request a SonarQube Server trial today and start writing better Dart code.
Feel free to reach out to our Community if you have any questions or need assistance with integrating Sonar solutions into your Dart projects. Happy coding!