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_lintprefer_const_constructors: truedart formatで実行dart formatが実行される