Skip to content

Commit

Permalink
Add new lints from Dart 3.6 (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
mchudy authored Dec 27, 2024
1 parent 3c8fd74 commit a021232
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
8 changes: 8 additions & 0 deletions packages/leancode_lint/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 15.0.0

- Enable the following lints:
- [`use_truncating_division`](https://dart.dev/tools/linter-rules/use_truncating_division)
- [`avoid_futureor_void`](https://dart.dev/tools/linter-rules/avoid_futureor_void)
- [`omit_obvious_local_variable_types`](https://dart.dev/tools/linter-rules/omit_obvious_local_variable_types)
- Disable the [`omit_local_variable_types`](https://dart.dev/tools/linter-rules/omit_local_variable_types)

# 14.4.0

- Support Flutter 3.27 and Dart 3.6
Expand Down
8 changes: 6 additions & 2 deletions packages/leancode_lint/lib/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ analyzer:
avoid_escaping_inner_quotes: warning
avoid_final_parameters: warning
avoid_function_literals_in_foreach_calls: warning
avoid_futureor_void: warning
avoid_implementing_value_types: warning
avoid_init_to_null: warning
avoid_js_rounded_ints: warning
Expand Down Expand Up @@ -87,7 +88,7 @@ analyzer:
noop_primitive_operations: warning
null_check_on_nullable_type_parameter: warning
null_closures: warning
omit_local_variable_types: warning
omit_obvious_local_variable_types: warning
only_throw_errors: warning
overridden_fields: warning
package_names: warning
Expand Down Expand Up @@ -186,6 +187,7 @@ analyzer:
use_super_parameters: warning
use_test_throws_matchers: warning
use_to_and_as_if_applicable: warning
use_truncating_division: warning
valid_regexps: warning
void_checks: warning
# todo diagnostic messages
Expand Down Expand Up @@ -226,6 +228,7 @@ linter:
avoid_field_initializers_in_const_classes: false
avoid_final_parameters: true
avoid_function_literals_in_foreach_calls: true
avoid_futureor_void: true
avoid_implementing_value_types: true
avoid_init_to_null: true
avoid_js_rounded_ints: true
Expand Down Expand Up @@ -312,7 +315,7 @@ linter:
noop_primitive_operations: true
null_check_on_nullable_type_parameter: true
null_closures: true
omit_local_variable_types: true
omit_obvious_local_variable_types: true
one_member_abstracts: false
only_throw_errors: true
overridden_fields: true
Expand Down Expand Up @@ -426,5 +429,6 @@ linter:
use_super_parameters: true
use_test_throws_matchers: true
use_to_and_as_if_applicable: true
use_truncating_division: true
valid_regexps: true
void_checks: true
2 changes: 1 addition & 1 deletion packages/leancode_lint/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: leancode_lint
version: 14.4.0
version: 15.0.0
homepage: https://github.com/leancodepl/flutter_corelibrary/tree/master/packages/leancode_lint
repository: https://github.com/leancodepl/flutter_corelibrary
description: Robust, high-quality lint rules used at LeanCode.
Expand Down

0 comments on commit a021232

Please sign in to comment.