Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
6 changes: 5 additions & 1 deletion packages/dart_frog/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
include: package:very_good_analysis/analysis_options.6.0.0.yaml
include: package:very_good_analysis/analysis_options.9.0.0.yaml
linter:
rules:
# Experimental and there are lots of false positives
specify_nonobvious_property_types: false
3 changes: 0 additions & 3 deletions packages/dart_frog/lib/dart_frog.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// A fast, minimalistic backend framework for Dart 🎯
library dart_frog;

export 'src/_internal.dart'
show
Cascade,
Expand Down
1 change: 1 addition & 0 deletions packages/dart_frog/lib/src/request_logger.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ part of '_internal.dart';
///
/// If [logger] is not passed, the message is just passed to [print].
Middleware requestLogger({
// ignoring to match the shelf.logRequests signature
// ignore: avoid_positional_boolean_parameters
void Function(String message, bool isError)? logger,
}) {
Expand Down
2 changes: 2 additions & 0 deletions packages/dart_frog/lib/src/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ class RouterEntry {
final params = <String>[];
var pattern = '';
for (final m in _parser.allMatches(route)) {
// avoiding string_buffers to align with shelf_router
// ignore: use_string_buffers
pattern += RegExp.escape(m[1]!);
if (m[2] != null) {
Expand Down Expand Up @@ -418,6 +419,7 @@ class RouterEntry {
}

if (_handler is Handler || _params.isEmpty) {
// ignoring to align with shelf_router
// ignore: avoid_dynamic_calls
return await _handler(updatedContext) as Response;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/dart_frog/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dev_dependencies:
mocktail: ^1.0.0
path: ^1.8.2
test: ^1.19.2
very_good_analysis: ">=5.1.0 <7.0.0"
very_good_analysis: ^9.0.0

false_secrets:
- test/src/serve_test.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ignoring for testing purposes
// ignore_for_file: prefer_const_constructors
// ignore_for_file: deprecated_member_use_from_same_package

Expand Down
1 change: 1 addition & 0 deletions packages/dart_frog/test/src/http_method_test.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ignoring for testing purposes
// ignore_for_file: prefer_const_declarations

import 'package:dart_frog/dart_frog.dart';
Expand Down
2 changes: 2 additions & 0 deletions packages/dart_frog/test/src/provider_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ void main() {
Response onRequest(RequestContext context) {
try {
context.read<Uri>();
// ignoring since we need to catch the StateError for testing
// ignore: avoid_catches_without_on_clauses
} catch (e) {
exception = e;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/dart_frog/test/src/request_logger_test.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// ignore_for_file: avoid_positional_boolean_parameters

import 'package:dart_frog/dart_frog.dart';
import 'package:mocktail/mocktail.dart';
import 'package:test/test.dart';
Expand All @@ -10,6 +8,8 @@ void main() {
group('requestLogger', () {
var gotLog = false;

// ignoring to align with shelf logger
// ignore: avoid_positional_boolean_parameters
void logger(String msg, bool isError) {
expect(gotLog, isFalse);
gotLog = true;
Expand Down
6 changes: 1 addition & 5 deletions packages/dart_frog/test/src/response_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,7 @@ void main() {

group('bufferOutput', () {
test('is omitted by default', () {
final response = Response.stream(
body: const Stream.empty(),
// ignore: avoid_redundant_argument_values
bufferOutput: true,
);
final response = Response.stream(body: const Stream.empty());

expect(
response.context,
Expand Down
6 changes: 5 additions & 1 deletion packages/dart_frog_auth/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
include: package:very_good_analysis/analysis_options.7.0.0.yaml
include: package:very_good_analysis/analysis_options.9.0.0.yaml
linter:
rules:
# Experimental and there are lots of false positives
specify_nonobvious_property_types: false
2 changes: 1 addition & 1 deletion packages/dart_frog_auth/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ dependencies:
dev_dependencies:
mocktail: ^1.0.0
test: ^1.19.2
very_good_analysis: ^7.0.0
very_good_analysis: ^9.0.0