Skip to content

Lint and dcm rules for Dart and Flutter used internally at BAM β€οΈπŸ’™πŸ’›

License

Notifications You must be signed in to change notification settings

bamlab/bam_analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

35 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

BAM Analysis

logo

Lint and dcm rules for Dart and Flutter used internally at BAM β€οΈπŸ’™πŸ’›.

Note: This package was heavily inspired by very_good_analysis.


πŸ§‘β€πŸ’» Usage

To use the lints, add as a dev dependency in your pubspec.yaml:

dart pub add dev:bam_analysis
# or
flutter pub add dev:bam_analysis

Then, add an include in analysis_options.yaml:

include: package:bam_analysis/bam_analysis.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

βš™οΈ Customize rules

To add or suppress a specific rules, you can edit the analysis_options.yaml file.

Suppression:

include: package:bam_analysis/bam_analysis.yaml
linter:
  rules:
    public_member_api_docs: false
dart_code_metrics:
  rules:
    - member-ordering: false

Addition:

include: package:bam_analysis/bam_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, bam_analysis will not be applied to generated files.

include: package:bam_analysis/bam_analysis.yaml
analyzer:
  exclude:
    - "**/*.g.dart"
    - "**/*.freezed.dart"
    - "**/*.graphql.dart"
dart_code_metrics:
  rules-exclude:
    - "**/*.g.dart"
    - "**/*.freezed.dart"
    - "**/*.graphql.dart"

πŸ‘‰ About BAM

We are a 130 people company developing and designing multiplatform 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 😁

About

Lint and dcm rules for Dart and Flutter used internally at BAM β€οΈπŸ’™πŸ’›

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages