diff --git a/very_good_core/__brick__/.github/workflows/main.yaml b/very_good_core/__brick__/.github/workflows/main.yaml index 44d43a27..c97517f1 100644 --- a/very_good_core/__brick__/.github/workflows/main.yaml +++ b/very_good_core/__brick__/.github/workflows/main.yaml @@ -20,6 +20,7 @@ jobs: uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1 with: flutter_version: "3.35.x" + run_bloc_lint: true spell-check: uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1 diff --git a/very_good_core/__brick__/README.md b/very_good_core/__brick__/README.md index e0aa628d..1ad93578 100644 --- a/very_good_core/__brick__/README.md +++ b/very_good_core/__brick__/README.md @@ -55,6 +55,22 @@ $ open coverage/index.html --- +## Bloc Lints ๐Ÿ” + +This project uses the [bloc_lint](https://pub.dev/packages/bloc_lint) package to enforce best practices using [bloc](https://pub.dev/packages/bloc). + +To validate linter errors, run + +```bash +dart run bloc_tools:bloc lint . +``` + +You can also validate with VSCode-based IDEs using the [official bloc extension](https://marketplace.visualstudio.com/items?itemName=FelixAngelov.bloc). + +To learn more, visit https://bloclibrary.dev/lint/ + +--- + ## Working with Translations ๐ŸŒ This project relies on [flutter_localizations][flutter_localizations_link] and follows the [official internationalization guide for Flutter][internationalization_link]. diff --git a/very_good_core/__brick__/analysis_options.yaml b/very_good_core/__brick__/analysis_options.yaml index 08d2fe28..6389d92f 100644 --- a/very_good_core/__brick__/analysis_options.yaml +++ b/very_good_core/__brick__/analysis_options.yaml @@ -1,4 +1,6 @@ -include: package:very_good_analysis/analysis_options.yaml +include: + - package:very_good_analysis/analysis_options.yaml + - package:bloc_lint/recommended.yaml analyzer: exclude: - lib/l10n/gen/* diff --git a/very_good_core/__brick__/pubspec.yaml b/very_good_core/__brick__/pubspec.yaml index 7f219766..22ea1cf0 100644 --- a/very_good_core/__brick__/pubspec.yaml +++ b/very_good_core/__brick__/pubspec.yaml @@ -17,7 +17,9 @@ dependencies: intl: ^0.20.2 dev_dependencies: + bloc_lint: ^0.3.2 bloc_test: ^10.0.0 + bloc_tools: ^0.1.0-dev.19 flutter_test: sdk: flutter mocktail: ^1.0.4 diff --git a/very_good_flame_game/__brick__/.github/workflows/main.yaml b/very_good_flame_game/__brick__/.github/workflows/main.yaml index 3d273333..11eaf0e5 100644 --- a/very_good_flame_game/__brick__/.github/workflows/main.yaml +++ b/very_good_flame_game/__brick__/.github/workflows/main.yaml @@ -20,6 +20,7 @@ jobs: uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1 with: flutter_version: "3.35.x" + run_bloc_lint: true spell-check: uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1 diff --git a/very_good_flame_game/__brick__/README.md b/very_good_flame_game/__brick__/README.md index f613cff7..41af8f81 100644 --- a/very_good_flame_game/__brick__/README.md +++ b/very_good_flame_game/__brick__/README.md @@ -55,6 +55,22 @@ $ open coverage/index.html --- +## Bloc Lints ๐Ÿ” + +This project uses the [bloc_lint](https://pub.dev/packages/bloc_lint) package to enforce best practices using [bloc](https://pub.dev/packages/bloc). + +To validate linter errors, run + +```bash +dart run bloc_tools:bloc lint . +``` + +You can also validate with VSCode-based IDEs using the [official bloc extension](https://marketplace.visualstudio.com/items?itemName=FelixAngelov.bloc). + +To learn more, visit https://bloclibrary.dev/lint/ + +--- + ## Working with Translations ๐ŸŒ This project relies on [flutter_localizations][flutter_localizations_link] and follows the [official internationalization guide for Flutter][internationalization_link]. diff --git a/very_good_flame_game/__brick__/analysis_options.yaml b/very_good_flame_game/__brick__/analysis_options.yaml index 699b5f72..994f96d3 100644 --- a/very_good_flame_game/__brick__/analysis_options.yaml +++ b/very_good_flame_game/__brick__/analysis_options.yaml @@ -1,4 +1,6 @@ -include: package:very_good_analysis/analysis_options.yaml +include: + - package:very_good_analysis/analysis_options.yaml + - package:bloc_lint/recommended.yaml analyzer: exclude: - lib/gen/* diff --git a/very_good_flame_game/__brick__/pubspec.yaml b/very_good_flame_game/__brick__/pubspec.yaml index 3e8db9f0..66a7f12f 100644 --- a/very_good_flame_game/__brick__/pubspec.yaml +++ b/very_good_flame_game/__brick__/pubspec.yaml @@ -23,7 +23,9 @@ dependencies: intl: ^0.20.2 dev_dependencies: + bloc_lint: ^0.3.2 bloc_test: ^10.0.0 + bloc_tools: ^0.1.0-dev.19 flame_test: ^2.0.3 flutter_test: sdk: flutter diff --git a/very_good_wear_app/__brick__/.github/workflows/main.yaml b/very_good_wear_app/__brick__/.github/workflows/main.yaml index 3d273333..11eaf0e5 100644 --- a/very_good_wear_app/__brick__/.github/workflows/main.yaml +++ b/very_good_wear_app/__brick__/.github/workflows/main.yaml @@ -20,6 +20,7 @@ jobs: uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1 with: flutter_version: "3.35.x" + run_bloc_lint: true spell-check: uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1 diff --git a/very_good_wear_app/__brick__/README.md b/very_good_wear_app/__brick__/README.md index 0eb19582..637aece7 100644 --- a/very_good_wear_app/__brick__/README.md +++ b/very_good_wear_app/__brick__/README.md @@ -35,6 +35,22 @@ _\*This template includes only the Android runner, as it is meant to run on Wear --- +## Bloc Lints ๐Ÿ” + +This project uses the [bloc_lint](https://pub.dev/packages/bloc_lint) package to enforce best practices using [bloc](https://pub.dev/packages/bloc). + +To validate linter errors, run + +```bash +dart run bloc_tools:bloc lint . +``` + +You can also validate with VSCode-based IDEs using the [official bloc extension](https://marketplace.visualstudio.com/items?itemName=FelixAngelov.bloc). + +To learn more, visit https://bloclibrary.dev/lint/ + +--- + ## Running Tests ๐Ÿงช To run all unit and widget tests use the following command: diff --git a/very_good_wear_app/__brick__/analysis_options.yaml b/very_good_wear_app/__brick__/analysis_options.yaml index 08d2fe28..6389d92f 100644 --- a/very_good_wear_app/__brick__/analysis_options.yaml +++ b/very_good_wear_app/__brick__/analysis_options.yaml @@ -1,4 +1,6 @@ -include: package:very_good_analysis/analysis_options.yaml +include: + - package:very_good_analysis/analysis_options.yaml + - package:bloc_lint/recommended.yaml analyzer: exclude: - lib/l10n/gen/* diff --git a/very_good_wear_app/__brick__/pubspec.yaml b/very_good_wear_app/__brick__/pubspec.yaml index f781d7d1..3ae1e5e7 100644 --- a/very_good_wear_app/__brick__/pubspec.yaml +++ b/very_good_wear_app/__brick__/pubspec.yaml @@ -17,7 +17,9 @@ dependencies: wearable_rotary: ^2.0.2 dev_dependencies: + bloc_lint: ^0.3.2 bloc_test: ^10.0.0 + bloc_tools: ^0.1.0-dev.19 flutter_test: sdk: flutter mocktail: ^1.0.4