mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 09:43:57 +00:00
[benchmarks] Disable omit_local_variable_types analyzer hint
This hint flags code such as int time = watch.elapsedMillisecond; and encourages using `var` everywhere: var time = watch.elapsedMillisecond; Though if the type is not obvious to a developer, we should be allowed to write it. Furthermore it copies the rules from `package:pedantic/analysis_options-1.9.0.yaml` to avoid being automatically opted-in to new rules when a new package:pedantic gets rolled into the SDK. Change-Id: I45c72584885c608a56745685e9068ba83dfbed47 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151526 Commit-Queue: Martin Kustermann <kustermann@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
parent
9239061138
commit
a1416976c0
|
@ -1,11 +1,15 @@
|
|||
include: package:pedantic/analysis_options.yaml
|
||||
# Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
|
||||
# for details. All rights reserved. Use of this source code is governed by a
|
||||
# BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#analyzer:
|
||||
# strong-mode:
|
||||
# implicit-casts: false
|
||||
linter:
|
||||
rules:
|
||||
#- always_declare_return_types
|
||||
#- annotate_overrides
|
||||
- always_declare_return_types
|
||||
- always_require_non_null_named_parameters
|
||||
- annotate_overrides
|
||||
- avoid_empty_else
|
||||
- avoid_function_literals_in_foreach_calls
|
||||
- avoid_init_to_null
|
||||
|
@ -19,11 +23,13 @@ linter:
|
|||
- avoid_types_as_parameter_names
|
||||
- avoid_unused_constructor_parameters
|
||||
- await_only_futures
|
||||
- camel_case_extensions
|
||||
- camel_case_types
|
||||
- cancel_subscriptions
|
||||
- comment_references
|
||||
#- constant_identifier_names
|
||||
- control_flow_in_finally
|
||||
- curly_braces_in_flow_control_structures
|
||||
- directives_ordering
|
||||
- empty_catches
|
||||
- empty_constructor_bodies
|
||||
|
@ -52,14 +58,18 @@ linter:
|
|||
- prefer_const_constructors
|
||||
- prefer_contains
|
||||
- prefer_equal_for_default_values
|
||||
- prefer_generic_function_type_aliases
|
||||
- prefer_final_fields
|
||||
- prefer_final_locals
|
||||
- prefer_for_elements_to_map_fromIterable
|
||||
- prefer_generic_function_type_aliases
|
||||
- prefer_if_null_operators
|
||||
- prefer_initializing_formals
|
||||
- prefer_interpolation_to_compose_strings
|
||||
- prefer_is_empty
|
||||
- prefer_is_not_empty
|
||||
#- prefer_single_quotes
|
||||
- prefer_iterable_whereType
|
||||
- prefer_single_quotes
|
||||
- prefer_spread_collections
|
||||
#- prefer_typing_uninitialized_variables
|
||||
- recursive_getters
|
||||
- slash_for_doc_comments
|
||||
|
@ -74,9 +84,10 @@ linter:
|
|||
- unnecessary_lambdas
|
||||
- unnecessary_new
|
||||
- unnecessary_null_aware_assignments
|
||||
- unnecessary_null_in_if_null_operators
|
||||
- unnecessary_parenthesis
|
||||
- unnecessary_statements
|
||||
#- unnecessary_this
|
||||
- unnecessary_this
|
||||
- unrelated_type_equality_checks
|
||||
- use_function_type_syntax_for_parameters
|
||||
- use_rethrow_when_possible
|
||||
|
|
Loading…
Reference in a new issue