docs(analysis): add instructions to create a new version (closes #104)

This commit is contained in:
Hugo Pointcheval 2023-02-07 14:43:52 +01:00
parent bd53d11e0d
commit 588a09e0a1
Signed by: hugo
GPG Key ID: 3AAC487E131E00BC

View File

@ -1,5 +1,5 @@
<!-- <!--
* Copyright (C) 2022 WYATT GROUP * Copyright (C) 2023 WYATT GROUP
* Please see the AUTHORS file for details. * Please see the AUTHORS file for details.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -20,21 +20,21 @@
![SDK: Dart & Flutter](https://img.shields.io/badge/SDK-Dart%20%7C%20Flutter-blue?style=flat-square) ![SDK: Dart & Flutter](https://img.shields.io/badge/SDK-Dart%20%7C%20Flutter-blue?style=flat-square)
This package provides lint rules for Dart and Flutter which are used at [Wyatt](https://wyattapp.io) and [Wyatt Studio](https://wyatt-studio.fr). For more information, see the complete list of options in **lib/analysis_options.2.3.0.yaml**. This package provides lint rules for Dart and Flutter which are used at [Wyatt](https://wyattapp.io) and [Wyatt Studio](https://wyatt-studio.fr). For more information, see the complete list of options in **lib/analysis_options.2.4.0.yaml**.
**Note**: This package was heavily inspired by [pedantic](https://github.com/dart-lang/pedantic), [Very Good Analysis](https://github.com/VeryGoodOpenSource/very_good_analysis) and the official [flutter_lints](https://pub.dev/packages/flutter_lints). **Note**: This package was heavily inspired by [pedantic](https://github.com/dart-lang/pedantic), [Very Good Analysis](https://github.com/VeryGoodOpenSource/very_good_analysis) and the official [flutter_lints](https://pub.dev/packages/flutter_lints).
## Usage ## Usage
To use the lints, add a dependency in your `pubspec.yaml`: To use the lints, add a dependency in your `pubspec.yaml` :
```yaml ```yaml
wyatt_analysis: wyatt_analysis:
hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub/ hosted: https://git.wyatt-studio.fr/api/packages/Wyatt-FOSS/pub/
version: 2.3.0 version: 2.4.0
``` ```
Then, add an include in `analysis_options.yaml`: Then, add an include in `analysis_options.yaml` :
```yaml ```yaml
include: package:wyatt_analysis/analysis_options.yaml include: package:wyatt_analysis/analysis_options.yaml
@ -49,13 +49,13 @@ include: package:wyatt_analysis/analysis_options.flutter.yaml
If you wish to restrict the lint version, specify a version of `analysis_options.yaml` instead: If you wish to restrict the lint version, specify a version of `analysis_options.yaml` instead:
```yaml ```yaml
include: package:wyatt_analysis/analysis_options.flutter.2.3.0.yaml include: package:wyatt_analysis/analysis_options.flutter.2.4.0.yaml
``` ```
If you just want **Dart** version: If you just want **Dart** version:
```yaml ```yaml
include: package:wyatt_analysis/analysis_options.2.3.0.yaml include: package:wyatt_analysis/analysis_options.2.4.0.yaml
``` ```
## Suppressing Lints ## Suppressing Lints
@ -87,7 +87,7 @@ class B {}
### Project Level ### Project Level
To surpress a specific lint rule for an entire project, modify `analysis_options.yaml`: To surpress a specific lint rule for an entire project, modify `analysis_options.yaml` :
```yaml ```yaml
include: package:wyatt_analysis/analysis_options.yaml include: package:wyatt_analysis/analysis_options.yaml
@ -104,6 +104,16 @@ To indicate your project is using `wyatt_analysis` → [![style: wyatt analysis]
[![style: wyatt analysis](https://img.shields.io/badge/Style-Wyatt%20Analysis-blue)](https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages/src/branch/master/packages/wyatt_analysis) [![style: wyatt analysis](https://img.shields.io/badge/Style-Wyatt%20Analysis-blue)](https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages/src/branch/master/packages/wyatt_analysis)
``` ```
## Development
When you want to create a new version of the plugin. Before any modification, execute the following command to create new files:
```sh
./new_version.sh <previous_version> <new_version>
```
> Where `<previous_version>` is 2.4.0
## Notes ## Notes
You can explore every lint rules [here](https://dart-lang.github.io/linter/lints/). You can explore every lint rules [here](https://dart-lang.github.io/linter/lints/).