analysis_options 2.0.0 icon indicating copy to clipboard operation
analysis_options: ^2.0.0 copied to clipboard

The set of rules that encourage good coding practices for applications, packages, and plugins.

publisher version likes points popularity


Analysis Options for Dart/Flutter #

The set of rules that encourage good coding practices for applications, packages, and plugins.


Features #

Analyzer and Linting Rules


Getting started #

To add the package, analysis_options, to an project:

  1. Depend on it

    • Add analysis_options under dev_dependencies in the pubspec.yaml file.
  2. Install it

    • From the terminal: Run flutter pub get.
  3. Import it

    • Add a corresponding include statement in the YAML code.

Usage #

To use the analysis options, add the following dev dependency in your pubspec.yaml file:

dev_dependencies:
  analysis_options: any

Add the following line in your analysis_options.yaml file:

include: package:analysis_options/analysis_options.yaml

Additional information #

  • Analyzer: Customize static analysis.
  • Linter: Configure linter rules.

Enabling stricter type checks #

analyzer:
  language:
    strict-casts: true

Enabling individual rules #

linter:
  rules:
    - avoid_print

Disabling individual rules #

linter:
  rules:
    public_member_api_docs: false

Excluding files #

analyzer:
  exclude:
    - lib/generated_plugin_registrant.dart

Ignoring rules #

analyzer:
  errors:
    todo: ignore

Changing the severity of rules #

analyzer:
  errors:
    dead_code: info

1
likes
130
pub points
39%
popularity

Publisher

verified publisher icong1joshi.dev

The set of rules that encourage good coding practices for applications, packages, and plugins.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

Icon for licenses.BSD-3-Clause (LICENSE)

More

Packages that depend on analysis_options