Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

dart.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.

Learn more

Dart 3.10 is taking off with dot shorthands, stable build hooks, nuanced deprecation annotations, and more!Learn more

Thedart analyze command performs the samestatic analysis that you get when you use an IDE or editor that has Dart support.

Tip

Here's an example of performing static analysis over all the Dart files under the current directory:

console
$ dart analyze

You can customize how the analyzer treats warnings and info-level issues. Normally the analyzer reports failure when it finds any errors or warnings, but not when it finds info-level issues. You can customize this behavior using the--fatal-infos and--no-fatal-warnings flags. For example, to make the analyzer fail when any issue is the--fatal-infos flag:

console
$ dart analyze --fatal-infos

You can add a directory or a single file argument:

console
$ dart analyze [<DIRECTORY> | <DART_FILE>]

For example, here's the command to analyze thebin directory:

console
$ dart analyze bin
Version note

Before Dart 2.13,dart analyze supported only directory arguments.

To customize the analysis, use an analysis options file or special comments in Dart source code, as described inCustomizing static analysis.

For information on command-line options, use the--help flag:

console
$ dart analyze --help
Was this page's content helpful?

Unless stated otherwise, the documentation on this site reflects Dart 3.10.0. Page last updated on 2025-9-4.View source orreport an issue.


[8]ページ先頭

©2009-2025 Movatter.jp