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

Bump analyzer to 2.4.0 #223

Open
wants to merge 4 commits into
base: master
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
10 changes: 10 additions & 0 deletions dart_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
tags:
core:
test_on: vm
creator:
test_on: vm
html:
test_on: browser
webdriver:
test_on: vm
timeout: 2x
1 change: 1 addition & 0 deletions lib/builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Builder pageloaderBuilder(BuilderOptions options) {
SharedPartBuilder([const PageObjectGenerator()], 'pageloader');

if (optionsMap.isNotEmpty) {
// ignore: unnecessary_null_comparison
if (log == null) {
throw StateError('Upgrade `build_runner` to at least 0.8.2.');
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/generators/methods/core_method_information.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/src/generators/methods/getter.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/src/generators/methods/iterable_finder_method.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/src/generators/methods/list_finder_method.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/src/generators/methods/mouse_finder_method.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/src/generators/methods/null_safety.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/src/generators/methods/pointer_finder_method.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/src/generators/methods/setter.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/src/generators/methods/single_finder_method.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/src/generators/methods/unannotated_method.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/src/generators/pageobject_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class PageObjectGenerator extends GeneratorForAnnotation<PageObject> {
library = await resolver
.libraryFor(await resolver.assetIdForElement(element.library));
final session = library.session;
resolvedLibrary = await session.getResolvedLibraryByElement2(library)
resolvedLibrary = await session.getResolvedLibraryByElement(library)
as ResolvedLibraryResult;
break;
} catch (_) {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/html/html_mouse.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ late HtmlMouse _globalMouse;
SyncFn<dynamic>? _cachedSyncFn;

/// Returns the globally used [HtmlMouse] in Html based tests.
HtmlMouse globalMouse(SyncFn<dynamic> syncFn) {
HtmlMouse globalMouse(SyncFn<dynamic>? syncFn) {
assert(syncFn != null);
// [SyncFn] may change based on when this function is called.
// If it does change, we need to create a new [HtmlMouse] since this
Expand Down
4 changes: 1 addition & 3 deletions lib/src/html/html_page_loader_element.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import 'dart:convert';
import 'dart:html';
import 'dart:js' as js;
import 'dart:math';
import 'dart:svg' show SvgElement;

import 'package:js/js_util.dart' as js_util;
Expand Down Expand Up @@ -757,7 +755,7 @@ String? _elementText(List<Node> elements) {
return _elementText(
elem.getDistributedNodes().whereType<Element>().toList());
}
if (elem.nodes == null || elem.nodes.isEmpty) {
if (elem.nodes.isEmpty) {
return elem.text;
}
return _elementText(elem.nodes);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/html/html_pointer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ late HtmlPointer _globalPointer;
SyncFn? _cachedSyncFn;

/// Returns the globally used [HtmlPointer] in Html based tests.
HtmlPointer globalPointer(SyncFn syncFn) {
HtmlPointer globalPointer(SyncFn? syncFn) {
assert(syncFn != null);
// [SyncFn] may change based on when this function is called.
// If it does change, we need to create a new [HtmlPointer] since this
Expand Down
4 changes: 2 additions & 2 deletions lib/src/webdriver/webdriver_page_loader_element.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class WebDriverPageLoaderElement implements PageLoaderElement {
_cachedElement = null,
_finder = null,
_parentElement = null {
assert(_driver != null);
// assert(_driver != null);
}

/// Constructs an element from a [WebElement].
Expand Down Expand Up @@ -347,7 +347,7 @@ class WebDriverPageLoaderElement implements PageLoaderElement {
// So we can try again after moving the element into the center of page.
try {
_retryWhenStale<void>(() => _single.click());
} catch (ElementClickInterceptedException) {
} catch (elementClickInterceptedException) {
await scrollIntoViewCentered();
_retryWhenStale<void>(() => _single.click());
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ environment:
sdk: '>=2.12.0 <3.0.0'

dependencies:
analyzer: ^1.7.1
analyzer: <2.5.0
build: ^2.0.2
built_value: ^8.0.6
build_config: ^1.0.0
Expand Down
1 change: 1 addition & 0 deletions test/core_method_information_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// limitations under the License.

@TestOn('vm')
@Tags(['core'])

import 'package:pageloader/src/generators/methods/core_method_information.dart';
import 'package:test/test.dart';
Expand Down
1 change: 1 addition & 0 deletions test/correct_gen_null_safety_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// limitations under the License.

@TestOn('vm')
@Tags(['core'])

import 'package:test/test.dart';

Expand Down
1 change: 1 addition & 0 deletions test/correct_gen_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// limitations under the License.

@TestOn('vm')
@Tags(['core'])

import 'package:test/test.dart';

Expand Down
2 changes: 1 addition & 1 deletion test/data/html_setup.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ html.Element setUp() {
<div id="mixin-div">mixin div</div>
<custom-events-element></custom-event-element>''';

final templateHtml = '<button id="inner">some <content></content></button>';
// final templateHtml = '<button id="inner">some <content></content></button>';

final results =
(body as html.Element).querySelectorAll('div[id=testdocument]');
Expand Down
126 changes: 63 additions & 63 deletions test/examples/correct/class_checks.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions test/examples/correct/empty.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading