Skip to content

Commit

Permalink
Sync lints and enable annotate_redeclares
Browse files Browse the repository at this point in the history
  • Loading branch information
simplezhli committed May 14, 2024
1 parent f1e6493 commit 5d0a867
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 7 additions & 3 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Specify analysis options.
#
# For a list of lints, see: https://dart.dev/lints
# For a list of lints, see: https://dart.dev/tools/linter-rules
# For guidelines on configuring static analysis, see:
# https://dart.dev/guides/language/analysis-options
# https://dart.dev/tools/analysis
#
# There are other similar analysis options files in the flutter repos,
# which should be kept in sync with this file:
Expand Down Expand Up @@ -39,13 +39,14 @@ analyzer:
linter:
rules:
# This list is derived from the list of all available lints located at
# https://github.com/dart-lang/linter/blob/main/example/all.yaml
# https://github.com/dart-lang/sdk/blob/main/pkg/linter/example/all.yaml
- always_declare_return_types
- always_put_control_body_on_new_line
# - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219
# - always_specify_types
# - always_use_package_imports # we do this commonly
- annotate_overrides
- annotate_redeclares
# - avoid_annotating_with_dynamic # conflicts with always_specify_types
- avoid_bool_literals_in_conditional_expressions
# - avoid_catches_without_on_clauses # blocked on https://github.com/dart-lang/linter/issues/3023
Expand Down Expand Up @@ -120,6 +121,7 @@ linter:
# - library_private_types_in_public_api
# - lines_longer_than_80_chars # required by flutter style
- literal_only_boolean_expressions
- missing_code_block_language_in_doc_comment
- missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
- no_default_cases
Expand Down Expand Up @@ -208,6 +210,8 @@ linter:
- unnecessary_getters_setters
# - unnecessary_lambdas # has false positives: https://github.com/dart-lang/linter/issues/498
- unnecessary_late
- unnecessary_library_directive
# - unnecessary_library_name # blocked on https://github.com/dart-lang/lints/issues/181#issuecomment-2018919034
- unnecessary_new
- unnecessary_null_aware_assignments
- unnecessary_null_aware_operator_on_extension_on_nullable
Expand Down
1 change: 0 additions & 1 deletion lib/util/date_utils.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
library utils;

import 'package:intl/intl.dart';

Expand Down

0 comments on commit 5d0a867

Please sign in to comment.