Last active
February 1, 2019 22:23
-
-
Save kwalrath/5094c56bd90199dc5692fde1137c9b4d to your computer and use it in GitHub Desktop.
implicit-casts: false still ignored
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Supported lint rules and documentation: | |
| # http://dart-lang.github.io/linter/lints/ | |
| analyzer: | |
| exclude: [build/**] | |
| strong-mode: | |
| implicit-casts: false | |
| implicit-dynamic: false | |
| linter: | |
| rules: | |
| #- always_declare_return_types | |
| #- always_specify_types | |
| - annotate_overrides | |
| #- avoid_as | |
| - avoid_empty_else | |
| - avoid_init_to_null | |
| - avoid_relative_lib_imports | |
| - avoid_return_types_on_setters | |
| - avoid_types_as_parameter_names | |
| - await_only_futures | |
| - camel_case_types | |
| - cancel_subscriptions | |
| - close_sinks | |
| - comment_references | |
| - constant_identifier_names | |
| - control_flow_in_finally | |
| - empty_catches | |
| - empty_constructor_bodies | |
| - empty_statements | |
| - hash_and_equals | |
| - implementation_imports | |
| - iterable_contains_unrelated_type | |
| - library_names | |
| - library_prefixes | |
| - list_remove_unrelated_type | |
| - no_duplicate_case_values | |
| - non_constant_identifier_names | |
| - one_member_abstracts | |
| - only_throw_errors | |
| - overridden_fields | |
| - package_api_docs | |
| - package_names | |
| - package_prefixed_library_names | |
| - prefer_contains | |
| - prefer_equal_for_default_values | |
| - prefer_is_not_empty | |
| #- public_member_api_docs | |
| - recursive_getters | |
| - slash_for_doc_comments | |
| #- sort_constructors_first # TODO: reinstate after https://github.com/dart-lang/site-www/issues/1196 is resolved? | |
| - sort_unnamed_constructors_first | |
| - super_goes_last | |
| - test_types_in_equals | |
| - throw_in_finally | |
| - type_annotate_public_apis | |
| - type_init_formals | |
| #- unawaited_futures | |
| - unnecessary_brace_in_string_interps | |
| - unnecessary_const | |
| - unnecessary_getters_setters | |
| - unnecessary_new | |
| - unrelated_type_equality_checks | |
| - use_rethrow_when_possible | |
| - valid_regexps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void showImplicitDynamic(Object someValue) { | |
| // #docregion implicit-dynamic | |
| Object o = someValue; | |
| String s = o; // Implicit downcast | |
| String s2 = s.substring(1); | |
| // #enddocregion implicit-dynamic | |
| print('substring: $s2'); | |
| } | |
| void main() { | |
| showImplicitDynamic(Object()); | |
| // showImplicitDynamic('abc'); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: analysis_options_samples | |
| description: Example code for dartlang.org/guides/language/analysis-options. | |
| environment: | |
| sdk: '>=2.1.0 <3.0.0' | |
| # dev_dependencies: | |
| # dartlang_examples_util: | |
| # path: ../util |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment