Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update very good analysis #100

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.19.6
flutter-version: 3.24.3
cache: true

- name: Setup pub
Expand Down
2 changes: 1 addition & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include: package:very_good_analysis/analysis_options.5.1.0.yaml
include: package:very_good_analysis/analysis_options.6.0.0.yaml

linter:
rules:
Expand Down
2 changes: 1 addition & 1 deletion packages/playbook/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
very_good_analysis: ^5.1.0
very_good_analysis: ^6.0.0

flutter:
uses-material-design: true
11 changes: 5 additions & 6 deletions packages/playbook_generator/lib/src/playbook_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ ${storiesLibrary.accept(emitter)}
if (element is ClassElement) {
return (element.unnamedConstructor?.isDefaultConstructor ?? false) &&
element.allSupertypes.any(
(s) => s.getDisplayString(withNullability: true) == w,
(s) => s.getDisplayString() == w,
);
} else if (element is FunctionElement) {
final firstParam = element.parameters.firstOrNull?.type
.getDisplayString(withNullability: false);
final firstParam =
element.parameters.firstOrNull?.type.getDisplayString();
return element.parameters.length <= 1 &&
(firstParam == null || firstParam == bc) &&
element.returnType.getDisplayString(withNullability: true) == w;
element.returnType.getDisplayString() == w;
} else {
return false;
}
Expand Down Expand Up @@ -135,8 +135,7 @@ ${a(refer(scenarioName, _playbookUrl))}(
.where((e) => e.isPublic && e.parameters.isEmpty)
.expand<Code>(
(e) {
final returnTypeString =
e.returnType.getDisplayString(withNullability: true);
final returnTypeString = e.returnType.getDisplayString();
final scenarioRefer = refer(e.displayName, uri);
if (returnTypeString == 'Scenario') {
return [scenarioRefer([]).code];
Expand Down
2 changes: 1 addition & 1 deletion packages/playbook_generator/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ dependencies:
dart_style: ^2.3.6

dev_dependencies:
very_good_analysis: ^5.1.0
very_good_analysis: ^6.0.0
2 changes: 1 addition & 1 deletion packages/playbook_snapshot/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ dependencies:
yaml: ^3.1.2

dev_dependencies:
very_good_analysis: ^5.1.0
very_good_analysis: ^6.0.0
2 changes: 1 addition & 1 deletion packages/playbook_ui/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
very_good_analysis: ^5.1.0
very_good_analysis: ^6.0.0

flutter:
uses-material-design: true
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ environment:

dev_dependencies:
melos: ^6.0.0
very_good_analysis: ^5.1.0
very_good_analysis: ^6.0.0