SonarCloud supports Dart 🎉

Dear Community,

We are thrilled to announce that the wait is finally over: SonarCloud now supports Dart! (Early Access version). This has been a long time coming, with the first community request dating back to August 2019. Your valuable input through surveys and the numerous +1s in the community thread has been instrumental in making this happen and getting us to this point of an Early Access version. Thank you for your unwavering support. Please note that support for Dart will be available exclusively with SonarCloud Team and Enterprise plans, as well as for Open Source projects.

This Early Access release of Dart support may not include hundreds of rules, but we have focused on delivering the most anticipated ones. Here’s what you can expect:

  • Support for loading coverage data provided by LCOV
  • 70+ rules, including the iconic Cognitive Complexity

To scan your Dart code, you will have to:

  • Make sure that it compiles before triggering a code scan
  • Configure sonar-scanner as part of your CI pipeline (please note that Automatic Analysis is not yet enabled for Dart)

Have a look at the documentation for more details.

Support in SonarLint and SonarQube will come later. We first want your feedback on this Early Access version and to increase the number of rules.
We are eager to hear from you, so don’t hesitate to reach out if you encounter any issues. Positive feedback is also welcome!

Enjoy,
Alex

19 Likes

:partying_face: for the Dart support but :sob: we won’t be able to use it

Hi @Philippe_Cade,

Would you care to share why not?

 
:smiley:
Ann

analysis not working

2 Likes

Ah. Right. That’s this part:

We are using a self hosted Sonar installation and our product is not open source, so if I understand Alexandre’s note well, we wont be able to use the feature?

(I hope I’m wrong)

1 Like

Hello @Philippe_Cade,

You will be able to scan your Dart code with an on-prem Sonar installation. Just wait a couple of additional months, and we will include it in a release of SonarQube (the exact version is still under discussion).

Alex

1 Like

Getting the same message with a paid plan

1 Like

Hello,

We received a couple of feedback and it’s great.

  • I confirm that you need to migrate from your old paid plan to the new Team plan to use the Dart analyzer. If you can’t right now but want to try the Dart analyzer, SonarCloud offers a 14-day trial, so you can create a new organization just for that purpose.
  • Automatic Analysis considers Dart as a supported language whereas we know that in this context (without knowledge about your dependencies), the results are not that good. We are going to deploy a fix to really exclude Dart from Automatic Analysis. You can also do it yourself by going into Administration > Analysis Method and turn off Automatic Analysis. Update 2024-09-17: the fix was deployed.
  • The SonarCloud GitHub Action doesn’t behave well with Dart projects. You can find a workaround in this post.

Alex

Will this be coming to the old paid plan anytime soon?

1 Like

Where are these rules documented?

Hi,

We won’t be adding Dart analysis to the old paid plan, since that plan is deprecated.

The rules are here:

 
HTH,
Ann

1 Like

A post was split to a new topic: Dart: support Melos dependency management?

A post was split to a new topic: Can’t migrate from the old paid plan to the Team plan

A post was split to a new topic: Fail to scan Dart/Flutter project on GitLab CI

3 posts were split to a new topic: Disappointed by SonarCloud’s price increase

Hi @Alexandre_Gigleux, can we have a timeline for the same support in SonarQube Enterprise, please?

Hello @cpirtea-bun,

It’s available starting from SonarQube 10.7 (see SonarQube 10.7 supports Dart!).

Alex

1 Like

How to be early access user for Sonarcloud Dart support.?

Hi @brightsonmacha-nmb,

Welcome to the community!

 
HTH,
Ann