GithubHelp home page GithubHelp logo

xocechka / very_good_analysis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from verygoodopensource/very_good_analysis

0.0 0.0 0.0 109 KB

Lint rules for Dart and Flutter used internally at Very Good Ventures ๐Ÿฆ„

Home Page: https://pub.dev/packages/very_good_analysis

License: MIT License

Dart 100.00%

very_good_analysis's Introduction

Very Good Analysis

Very Good Ventures Very Good Ventures

Developed with ๐Ÿ’™ by Very Good Ventures ๐Ÿฆ„

ci pub package License: MIT style: very good analysis


This package provides lint rules for Dart and Flutter which are used at Very Good Ventures. For more information, see the complete list of options.

Note: This package was heavily inspired by pedantic.

Usage

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

# If you use `package:very_good_analysis/very_good_analysis.dart`, add a normal dependency.
dependencies:
  very_good_analysis: ^2.4.0

# Or, if you just want `analysis_options.yaml`, it can be a dev dependency.
dev_dependencies:
  very_good_analysis: ^2.4.0

Then, add an include in analysis_options.yaml:

include: package:very_good_analysis/analysis_options.yaml

This will ensure you always use the latest version of the lints. If you wish to restrict the lint version, specify a version of analysis_options.yaml instead:

include: package:very_good_analysis/analysis_options.2.4.0.yaml

Suppressing Lints

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

An example use case for suppressing lint rules at the file level is suppressing the prefer_const_constructors in order to achieve 100% code coverage. This is due to the fact that const constructors are executed before the tests are run, resulting in no coverage collection.

Line Level

To suppress 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 suppress 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 suppress a specific lint rule for an entire project, modify analysis_options.yaml:

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

Badge

To indicate your project is using very_good_analysis โ†’ style: very good analysis

[![style: very good analysis](https://img.shields.io/badge/style-very_good_analysis-B22C89.svg)](https://pub.dev/packages/very_good_analysis)

very_good_analysis's People

Contributors

felangel avatar jorgecoca avatar alardizabal avatar jeroen-meijer avatar arbazadam13 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.