In my Dart yaml file I have
analyzer:
strong-mode: true
but it doesn't do anything. I also added the analyzer:
dependencies:
analyzer: any
browser: ^0.10.0
polymer: ^1.0.0-rc.16
polymer_elements: ^1.0.0-rc.8
I'm missing something (brain I reckon). What is it please?
Thanks
Steve
Place the analysis options file, analysis_options. yaml , at the root of the package, in the same directory as the pubspec file.
The dart analyze command performs the same static analysis that you get when you use an IDE or editor that has Dart support. For more information about this and other dart commands, see the Dart command-line tool page.
By default, Flutter Analyze is disabled and has to be enabled in App settings > Tests > Static code analysis by checking the Enable Flutter analyzer option.
Add a file analysis_options.yaml
( old) in the directory where your .analysis_options
pubspec.yaml
is.
add
analyzer:
strong-mode: true
or if you also want to disable implicit-casts and/or implicit-dynamic
analyzer:
strong-mode:
implicit-casts: false
implicit-dynamic: false
You can also enable additional linter rules
linter:
rules:
- always_declare_return_types
For all supported linter rules see http://dart-lang.github.io/linter/lints/ and Suppress hint about use of protected member
See also https://www.dartlang.org/guides/language/analysis-options
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With