Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flutterando/flutterando_analysis
Lint rules for Dart and Flutter used internally at Flutterando
https://github.com/flutterando/flutterando_analysis
Last synced: about 2 months ago
JSON representation
Lint rules for Dart and Flutter used internally at Flutterando
- Host: GitHub
- URL: https://github.com/flutterando/flutterando_analysis
- Owner: Flutterando
- License: mit
- Created: 2022-02-21T18:13:25.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-16T04:15:59.000Z (almost 2 years ago)
- Last Synced: 2023-08-09T13:44:51.042Z (over 1 year ago)
- Language: C++
- Size: 582 KB
- Stars: 7
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Flutterando Analysis
This package provides lint rules for Dart and Flutter which are used in
Flutterando's packages and projects. For more information, see the complete list of options.
Report Bug
·
Request Feature
[![Version](https://img.shields.io/github/v/release/flutterando/flutterando_analysis?style=plastic)](https://pub.dev/packages/flutterando_analysis)
[![Pub Points](https://img.shields.io/pub/points/flutterando_analysis?label=pub%20points&style=plastic)](https://pub.dev/packages/flutterando_analysis/score)
[![Pub Points](https://img.shields.io/badge/style-flutterando__analysis-blueviolet?style=plastic)](https://pub.dev/packages/flutterando_analysis/)[![Pub Publisher](https://img.shields.io/pub/publisher/flutterando_analysis?style=plastic)](https://pub.dev/publishers/flutterando.com.br/packages)
---
Table of Contents
- About The Project
- Sponsors
- How to Use
- How to Supress Lints
- Badge
- Contributing
- Contact
- Acknowledgements
---
## About The Project
Flutterando Analysis are a set of Flutter and Dart Lint rules that are the basis of our projects here at the community. They were inspired and selected from our work experience with other companies, and are backed up by several senior Flutter developers that can guarantee it's usefullness.
This project is distributed under the MIT License. See `LICENSE.txt` for more information.
## Sponsors
## How To Use
To use our linter rules import it to your project like this:
a) Adding the package as a dependency in your Pubspec.yaml:
```yaml
# Add it as a dev dependency
dev_dependencies:
flutterando_analysis: ^0.0.2# Or as a normal dependency if you need to
dependencies:
flutterando_analysis: ^0.0.2
```b) Alternatively, use Dart Pub. You can take out the tag `--dev` if you want to install as a normal dependency:
```sh
dart pub add --dev flutterando_analysis
```After importing it, add an include in your project's `analysis_options.yaml`:
```yaml
include: package:flutterando_analysis/flutter.yaml
```or, for Dart:
```yaml
include: package:flutterando_analysis/dart.yaml
```There are 4 sets of linter rules that you can choose from:
- dart.yaml
- flutter.yaml- dart_package.yaml
- flutter_package.yaml
(this second set has the rule "public_member_api_docs" set to True)See also the analysis_options.0.0.1.yaml to know which rules we are using.
## How To Suppress 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:
```dart
// 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:
```dart
// ignore_for_file: public_member_api_docsclass A {}
class B {}
```### Project Level
To suppress a specific lint rule for an entire project, modify `analysis_options.yaml`:
Example (change flutterando_analysis.yaml for the analysis file you are using, like in the Getting Started section above):
```yaml
include: package:flutterando_analysis/flutterando_analysis.yaml
linter:
rules:
public_member_api_docs: false
```
## Badge
To indicate that your project is using `flutterando_analysis` you can use this badge:
Just copy and paste in your readme.md the code below:
```md
[![style: Flutterando analysis](https://img.shields.io/badge/style-flutterando__analysis-blueviolet)](https://pub.dev/packages/flutterando_analysis)
```## Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
If you have a suggestion that would make this better or questions, please open an issue here, with the appropriate tag.
Don't forget to give the project a star! Thanks!Remember to include a tag, and to follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) and [Semantic Versioning](https://semver.org/) when uploading your commit and/or creating the issue.
## Contact
Flutterando Community
- [Discord](https://discord.gg/qNBDHNARja)
- [Telegram](https://t.me/flutterando)
- [Website](https://www.flutterando.com.br)
- [Youtube Channel](https://www.youtube.com.br/flutterando)
- [Other useful links](https://linktr.ee/flutterando)## Acknowledgements
Thanks to the people who contributed to this project.
Disclaimer: this project's readme was based on very_good_analysis' readme.
## Maintaned by
Built and maintained by Flutterando.