Skip to content

Commit

Permalink
Bump custom_lint
Browse files Browse the repository at this point in the history
  • Loading branch information
rrousselGit committed Feb 4, 2024
1 parent 9d8d5ad commit aad4730
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion examples/counter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies:

dev_dependencies:
build_runner: ^2.3.3
custom_lint: ^0.5.2
custom_lint: ^0.6.0
flutter_test:
sdk: flutter
freezed: ^2.3.2
Expand Down
2 changes: 1 addition & 1 deletion packages/riverpod_analyzer_utils/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
analyzer: ">=5.12.0 <7.0.0"
collection: ^1.16.0
crypto: ^3.0.2
custom_lint_core: ^0.5.2
custom_lint_core: ^0.6.0
freezed_annotation: ^2.2.0
meta: ^1.7.0
path: ^1.8.0
Expand Down
2 changes: 1 addition & 1 deletion packages/riverpod_lint/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
analyzer: ">=6.0.0 <7.0.0"
analyzer_plugin: ^0.11.2
collection: ^1.16.0
custom_lint_builder: ^0.5.2
custom_lint_builder: ^0.6.0
meta: ^1.7.0
path: ^1.8.1
riverpod: ^2.5.0
Expand Down
4 changes: 2 additions & 2 deletions packages/riverpod_lint_flutter_test/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ dependencies:

dev_dependencies:
build_runner: ^2.4.6
custom_lint: ^0.5.2
custom_lint_core: ^0.5.14
custom_lint: ^0.6.0
custom_lint_core: ^0.6.0
freezed: ^2.3.2
json_serializable: ^6.6.1
riverpod_lint:
Expand Down
13 changes: 7 additions & 6 deletions packages/riverpod_lint_flutter_test/test/golden.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'dart:convert';
import 'dart:io';

import 'package:test/test.dart';
Expand Down Expand Up @@ -36,28 +35,30 @@ void testGolden(
result as ResolvedUnitResult;

final changes = await body(result).then((value) => value.toList());
final source = file.readAsStringSync();

try {
expect(
changes,
matcherNormalizedPrioritizedSourceChangeSnapshot(
fileName,
encoder: const JsonEncoder.withIndent(' '),
sources: {'**': source},
relativePath: Directory.current.path,
),
);
} on TestFailure {
// ignore: deprecated_member_use_from_same_package
if (!goldenWrite) rethrow;

final file = File('test/$fileName');

final source = File(sourcePath).readAsStringSync();
final result = encodePrioritizedSourceChanges(
changes,
source: source,
sources: {'**': source},
relativePath: Directory.current.path,
);

file
final golden = File('test/$fileName');
golden
..createSync(recursive: true)
..writeAsStringSync(result);
return;
Expand Down

0 comments on commit aad4730

Please sign in to comment.