60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
include: package:lints/recommended.yaml
|
|
|
|
linter:
|
|
rules:
|
|
camel_case_types: true
|
|
avoid_print: true
|
|
constant_identifier_names: true
|
|
prefer_final_locals: true
|
|
prefer_final_in_for_each: true
|
|
sort_pub_dependencies: true
|
|
always_use_package_imports: true
|
|
always_declare_return_types: true
|
|
prefer_single_quotes: true
|
|
sort_child_properties_last: true
|
|
unawaited_futures: true
|
|
unsafe_html: true
|
|
avoid_function_literals_in_foreach_calls: false
|
|
non_constant_identifier_names: false # seems to wrongly diagnose static const variables
|
|
|
|
analyzer:
|
|
errors:
|
|
todo: ignore
|
|
exclude:
|
|
- example/main.dart
|
|
# needed until crypto packages upgrade
|
|
- lib/src/database/database.g.dart
|
|
plugins:
|
|
# Show code metrics in IDE
|
|
# - dart_code_metrics
|
|
|
|
dart_code_metrics:
|
|
metrics:
|
|
cyclomatic-complexity: 20
|
|
number-of-arguments: 4
|
|
maximum-nesting-level: 5
|
|
source-lines-of-code: 50
|
|
# This is still unstable, so handle with care
|
|
maintainability-index: 40
|
|
metrics-exclude:
|
|
- test/**
|
|
rules:
|
|
#- newline-before-return
|
|
- no-boolean-literal-compare
|
|
- no-empty-block
|
|
#- prefer-trailing-comma
|
|
- prefer-conditional-expressions
|
|
- no-equal-arguments
|
|
- no-equal-then-else
|
|
- no-magic-number:
|
|
severity: style # too noisy otherwise atm
|
|
- avoid-late-keyword:
|
|
severity: style # too noisy otherwise atm
|
|
- avoid-non-null-assertion:
|
|
severity: style # too noisy otherwise atm
|
|
- avoid-unused-parameters
|
|
- binary-expression-operand-order
|
|
anti-patterns:
|
|
- long-method
|
|
- long-parameter-list
|