Skip to content

Commit 574f1bc

Browse files
author
Illia Romanenko
committed
Order rues alphabetically
Add more details on how to see checker results.
1 parent 906f92b commit 574f1bc

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ And then include `solid_lints` into your project top-level `analysis_options.yam
1818
include: package:solid_lints/analysis_options.yaml
1919
```
2020

21+
Then you can see suggestions in your IDE or you can run checks manually:
22+
23+
```bash
24+
dart analyze;
25+
dart run dart_code_metrics:metrics analyze lib;
26+
dart run dart_code_metrics:metrics check-unused-files lib;
27+
dart run dart_code_metrics:metrics check-unused-l10n lib;
28+
29+
```
30+
31+
Learn more: https://github.com/dart-code-checker/dart-code-metrics#cli
2132
# Badge
2233

2334
To indicate that your project is using Solid Lints, you can use the following badge:

lib/analysis_options.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ dart_code_metrics:
2525
# source-lines-of-code: 50
2626
# lines-of-code: 50
2727
rules:
28-
- avoid-non-null-assertion
2928
- avoid-late-keyword
29+
- avoid-non-null-assertion
3030
- avoid-returning-widgets
3131
- avoid-unnecessary-setstate
3232
- newline-before-return
@@ -43,8 +43,8 @@ linter:
4343
- annotate_overrides
4444
- avoid_bool_literals_in_conditional_expressions
4545
- avoid_catching_errors
46-
- avoid_dynamic_calls
4746
- avoid_double_and_int_checks
47+
- avoid_dynamic_calls
4848
- avoid_empty_else
4949
- avoid_escaping_inner_quotes
5050
- avoid_field_initializers_in_const_classes
@@ -127,9 +127,11 @@ linter:
127127
- prefer_constructors_over_static_methods
128128
- prefer_contains
129129
- prefer_equal_for_default_values
130-
# Not used, as the default app template has a single statement return code generated.
131-
# We are unaware of any substantial evidence that improves code when using expression function body vs single statement return.
132-
# - prefer_expression_function_bodies
130+
# Not used, as the default app template has a single statement return code generated.
131+
# While this could be beneficial for Dart projects and maintaining code style, we are unaware
132+
# of any substantial evidence that improves code when using expression function body
133+
# vs single statement return. We are considering including this in Dart only lints.
134+
# - prefer_expression_function_bodies
133135
- prefer_final_fields
134136
- prefer_final_in_for_each
135137
- prefer_final_locals
@@ -193,8 +195,8 @@ linter:
193195
# - use_decorated_box
194196
- use_full_hex_values_for_flutter_colors
195197
- use_function_type_syntax_for_parameters
196-
- use_is_even_rather_than_modulo
197198
- use_if_null_to_convert_nulls_to_bools
199+
- use_is_even_rather_than_modulo
198200
- use_named_constants
199201
- use_rethrow_when_possible
200202
- use_setters_to_change_properties

0 commit comments

Comments
 (0)