- Add this package to dev_dependencies
dev_dependencies:
devartel_analysis:
git:
url: https://github.com/DevArtel/devartel_analysis.git
ref: v3.0.0
- Create an
analysis_options.yaml
Example analysis_options.yaml
file:
include: package:devartel_analysis/analysis_options.yaml
Or imports lints only:
# This imports only lints
include: package:devartel_analysis/lints.yaml
analyzer:
# Provide your analyzer configuration here
This package is customizable, you can change rules depending on project needs.
To do so adjust your analysis_options.yaml
.
include: package:devartel_analysis/analysis_options.yaml
linter:
rules:
# Disable individual rules
always_put_required_named_parameters_first: false
avoid_classes_with_only_static_members: false
# Enable individual rules
sort_constructors_first: true
prefer_single_quotes: true
include: package:devartel_analysis/analysis_options.yaml
analyzer:
plugins:
- dart_code_metrics
exclude:
- "lib/**/*.g.dart"
- "lib/**/*.freezed.dart"