We have introduced this module to ensure consistency throughout all projects build @Tapped, this will ensure us fast and secure development.
- Add the following to the
dev_dependencies
in yourpubspec.yaml
file:
dev_dependencies:
flutter_lints: ^1.0.0
tapped_lints:
git:
url: https://github.com/tappeddev/tapped_lints.git
ref: master
- Then run
flutter pub get
to get the dependencies. - If you don't have the file
analysis_options.yaml
in the root of you project - create it. - Add the following to
analysis_options.yaml
:
include: package:tapped_lints/flutter.yaml
include: package:tapped_lints/flutter-3.10.yaml
Dart Analysis
tap: warning: The include file 'package:flutter_lints/flutter.yaml' in '/**/.pub-cache/git/tapped_lints-refnumber/lib/flutter.yaml' can't be found when analyzing '/path/to/module'. (include_file_not_found at [] analysis_options.yaml:1)
- In your
analysis_options.yaml
file you can always add additionalrules/excludes/or any other
like this:
include: package:tapped_lints/flutter.yaml
linter:
rules:
overridden_fields: false
analyzer:
exclude:
- 'lib/generated/**'