Skip to content

solutelabs/sl-flutter-lint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

solutelabs_lint

A set of lint rules to follow for coding standard

Usage

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

dev_dependencies:
  solutelabs_lint:
    git:
      url: https://github.com/solutelabs/solutelabs_lint
      ref: dev

Then, add an include in analysis_options.yaml:

include: package:solutelabs_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:solutelabs_lint/analysis_options.yaml
linter:
  rules:
    public_member_api_docs: false

About

A set of lint rules to follow for coding standard

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages