Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
lsaudon committed Sep 13, 2022
2 parents 62c61bf + 2c7df5c commit c5ab790
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
@@ -1,3 +1,3 @@
# Every request must be reviewed and accepted by:

* @felangel @jorgecoca @deremer
* @felangel @renancaraujo @wolfenrain
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,8 @@
# 3.0.2

- fix: remove deprecated `invariant_booleans` lint
- fix: deprecate `unawaited` (use `unawaited` from `dart:async` instead).

# 3.0.1

- feat: use analyzer language modes instead of deprecated `strong-mode`
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -23,11 +23,11 @@ To use the lints, add a dependency in your `pubspec.yaml`:
```yaml
# If you use `package:very_good_analysis/very_good_analysis.dart`, add a normal dependency.
dependencies:
very_good_analysis: ^3.0.1
very_good_analysis: ^3.0.2

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

Then, add an include in `analysis_options.yaml`:
Expand Down
18 changes: 9 additions & 9 deletions example/lib/example.dart
@@ -1,12 +1,12 @@
import 'package:very_good_analysis/very_good_analysis.dart';
// The following syntax deactivates a lint for the entire file:
// ignore_for_file: avoid_print

Future<void> main() async {
/// Await async functions.
await asyncFunction();
void main() {
/// The following line would normally show a lint warning
/// but we can disable the lint rule for this line using the following syntax.
var greeting = 'hello world'; // ignore: prefer_final_locals

/// Use [unawaited] to indicate that a [Future] is intentionally not awaited.
/// Otherwise you'll get a warning
unawaited(asyncFunction());
/// The following line would normally show a lint warning
/// but we can disable the lint rule for this file using `ignore_for_file`.
print(greeting);
}

Future<String> asyncFunction() => Future.value('hello world!');
1 change: 1 addition & 0 deletions lib/very_good_analysis.dart
Expand Up @@ -9,4 +9,5 @@ library very_good_analysis;
/// there are times where one or more futures are intentionally not awaited.
/// This function may be used to ignore a particular future. It silences the
/// `unawaited_futures` lint.
@Deprecated('Please use unawaited from dart:async.')
void unawaited(Future<void>? future) {}
2 changes: 1 addition & 1 deletion pubspec.yaml
@@ -1,5 +1,5 @@
name: very_good_analysis
version: 3.0.1
version: 3.0.2
description: Lint rules for Dart and Flutter used internally at Very Good Ventures.
repository: https://github.com/VeryGoodOpenSource/very_good_analysis
issue_tracker: https://github.com/VeryGoodOpenSource/very_good_analysis/issues
Expand Down

0 comments on commit c5ab790

Please sign in to comment.