Start FreeLog in
SonarCloud | Advanced setup | Languages | Dart

Dart

On this page

Language-specific properties

You can discover and update Dart-specific properties in the project Administration > General Settings > Languages > Dart.

Preparing the analysis

Before performing the analysis, we highly recommend:

  • running dart pub get, to retrieve all project dependencies declared in pubspec.yaml
  • performing a full and successful build of your Dart project

Otherwise, you might get incomplete and potentially incorrect analysis results. Running dart pub get alone may not be enough to produce a correct analysis, for example, when you analyze generated code.

Analyzing generated code

When code generation is done via automated source code generation, the analysis of generated code can only happen after the execution of source_gen, which requires a full build of the Dart project containing the builders.

When code generation is done via lower-level packages such as build, the analysis should only happen once the source has been generated and persisted on disk.


Was this page helpful?

© 2008-2024 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARLINT, SONARQUBE, SONARCLOUD, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License