Lint and dcm rules for Dart and Flutter used internally at Theodo Apps ❤️💙💛.
Note: This package was heavily inspired by very_good_analysis.To use the lints, add as a dev dependency in your pubspec.yaml
:
dart pub add dev:theodo_analysis
# or
flutter pub add dev:theodo_analysis
Then, add an include in analysis_options.yaml
:
include: package:theodo_analysis/analysis_options.yaml
Optional: enable DCM. This packages also include a subset of dcm rules. Since dcm needs an API key to start. You can skip this part. Also, we consider it as a great tool, and we recommend it's usage.
First instal dcm:
$ brew tap CQLabs/dcm
$ brew install dcm
Then, activate the license:
dcm activate --license-key=YOUR_KEY
To add or suppress a specific rules, you can edit the analysis_options.yaml
file.
Suppression:
include: package:theodo_analysis/theodo_analysis.yaml
linter:
rules:
public_member_api_docs: false
dart_code_metrics:
rules:
- member-ordering: false
Addition:
include: package:theodo_analysis/theodo_analysis.yaml
linter:
rules:
- no_leading_underscores_for_local_identifiers
dart_code_metrics:
rules:
- avoid-inferrable-type-arguments
The list of all available dart rule can be found here. And the list of all available dcm rules can be found here.
You can also disable it for specific files or folder. By default, theodo_analysis will not be applied to generated files.
include: package:theodo_analysis/theodo_analysis.yaml
analyzer:
exclude:
- "**/*.g.dart"
- "**/*.freezed.dart"
- "**/*.graphql.dart"
dart_code_metrics:
rules-exclude:
- "**/*.g.dart"
- "**/*.freezed.dart"
- "**/*.graphql.dart"
We are a 130 people company developing and designing universal applications with React Native and Flutter using the Lean & Agile methodology. To get more information on the solutions that would suit your needs, feel free to get in touch by email or through or contact form!
We will always answer you with pleasure 😁