https://github.com/g1j0shi/analysis_options
The set of rules that encourage good coding practices for applications, packages, and plugins.
https://github.com/g1j0shi/analysis_options
analysis-options dart flutter linter pub
Last synced: about 2 months ago
JSON representation
The set of rules that encourage good coding practices for applications, packages, and plugins.
- Host: GitHub
- URL: https://github.com/g1j0shi/analysis_options
- Owner: G1J0SHI
- License: bsd-3-clause
- Created: 2022-04-21T18:19:17.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-05T14:23:53.000Z (5 months ago)
- Last Synced: 2025-04-15T02:18:49.242Z (about 2 months ago)
- Topics: analysis-options, dart, flutter, linter, pub
- Language: Dart
- Homepage: https://pub.dev/packages/analysis_options
- Size: 211 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Analysis Options for Dart/Flutter
![publisher][publisher]
![version][version]
![likes][likes]
![points][points]
![popularity][popularity]
![downloads][downloads]---
**_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:
```yaml
dev_dependencies:
analysis_options: any
```Add the following line in your `analysis_options.yaml` file:
```yaml
include: package:analysis_options/analysis_options.yaml
```---
## Additional information
- `Analyzer`: Customize static analysis.
- `Linter`: Configure linter rules.### Enabling stricter type checks
```yaml
analyzer:
language:
strict-casts: true
```### Enabling individual rules
```yaml
linter:
rules:
- avoid_print
```### Disabling individual rules
```yaml
linter:
rules:
public_member_api_docs: false
```### Excluding files
```yaml
analyzer:
exclude:
- lib/generated_plugin_registrant.dart
```### Ignoring rules
```yaml
analyzer:
errors:
todo: ignore
```### Changing the severity of rules
```yaml
analyzer:
errors:
dead_code: info
```---
[publisher]: https://img.shields.io/pub/publisher/analysis_options
[version]: https://img.shields.io/pub/v/analysis_options
[likes]: https://img.shields.io/pub/likes/analysis_options
[points]: https://img.shields.io/pub/points/analysis_options
[popularity]: https://img.shields.io/pub/popularity/analysis_options
[downloads]: https://img.shields.io/pub/dm/analysis_options