TOP(About this memo)) > 一覧(Dart) > 静的解析
One benefit of static type checking is the ability to find bugs at compile time using Dart’s static analyzer.
dart analyze
によって 静的解析(アナライザー+リンターの実行)が実行される。
dart fix
で自動修正されるものは、この結果のうちリンターの自動修正可能なもの(クイックフィックス)に対して行われる。
dart fix --apply
が実行されるdart analyze
)は dart compile
や dart run
実行時の 解析と同じ?
# 公式サンプルコード
include: package:lints/recommended.yaml
analyzer:
exclude: [build/**]
language:
strict-casts: true
strict-raw-types: true
linter:
rules:
- cancel_subscriptions
// ignore: name_of_lint
// ignore_for_file: name_of_lint
prefer_const_constructors: true
dart format
で実行dart format
が実行される