Skip to content

Latest commit

 

History

History

deriv_lint

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Deriv Lint

A set of lint rules for Dart and Flutter projects.

Usage

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

dev_dependencies:
  deriv_lint:
    git:
      url: https://github.com/deriv-com/flutter-deriv-packages.git
      path: packages/deriv_lint
      ref: dev

Then, add an include in analysis_options.yaml:

include: package:deriv_lint/analysis_options.yaml

Suppressing Lints

There may be cases where specific lint rules are undesirable. Lint rules can be surpressed at the line, file, or project level.

Line Level

To surpress a specific lint rule for a specific line of code, use an ignore comment directly above the line:

// ignore: public_member_api_docs
class A {}

File Level

To surpress a specific lint rule of a specific file, use an ignore_for_file comment at the top of the file:

// ignore_for_file: public_member_api_docs

class A {}

class B {}

Project Level

To surpress a specific lint rule for an entire project, modify analysis_options.yaml:

include: package:deriv_lint/analysis_options.yaml
linter:
  rules:
    public_member_api_docs: false