blob: f0728290453aa9cca2b6679888968e45d17438b0 [file] [log] [blame]
# Copyright (c) 2018, 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.
#
# Google internally enforced rules.
#
# This is a living document that will evolve over time.
#
# Copy and modify as you see fit!
linter:
rules:
- avoid_empty_else
- avoid_relative_lib_imports
- avoid_return_types_on_setters
- avoid_types_as_parameter_names
- control_flow_in_finally
- no_duplicate_case_values
- prefer_contains
- prefer_equal_for_default_values
- prefer_is_not_empty
- recursive_getters
- throw_in_finally
- unrelated_type_equality_checks
- use_rethrow_when_possible
- valid_regexps
# The following lints will NOT be enforced for google internal code.
#
# always_put_control_body_on_new_line
# Violates Effective Dart "DO format your code using dartfmt". See note
# about Flutter SDK style below.
# avoid_relative_lib_imports
# Enforced as part of the build rather than as a lint. Since it's
# effectively enabled it appears in the above list, too.
# always_specify_types
# Violates Effective Dart "AVOID type annotating initialized local
# variables" and others. See note about Flutter SDK style below.
# avoid_as
# Does not reflect standard usage. See note about Flutter SDK style below.
# empty_statements
# Enforcing use of dartfmt is sufficient to make empty statements obvious.
# Also, see issue #383 for discussion of false positives.
# prefer_bool_in_asserts
# Obsolete in Dart 2; bool is required in asserts.
# prefer_final_locals
# Does not reflect standard usage.
#
# Note on Flutter SDK Style: some lints were created specifically to support
# Flutter SDK development. Flutter app developers should instead use standard
# Dart style as described in Effective Dart, and should not use these lints.