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 lints from 2.1.1 to 3.0.0 in /dart #1695

Merged
merged 2 commits into from
Dec 21, 2023
Merged
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: 2 additions & 0 deletions dart/lib/sentry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// found in the LICENSE file.

/// A pure Dart client for Sentry.io crash reporting.
library sentry_dart;

export 'src/run_zoned_guarded_integration.dart';
export 'src/hub.dart';
// useful for tests
Expand Down
35 changes: 12 additions & 23 deletions dart/lib/src/protocol/sentry_transaction.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,45 +17,34 @@ class SentryTransaction extends SentryEvent {

SentryTransaction(
this.tracer, {
SentryId? eventId,
super.eventId,
DateTime? timestamp,
String? platform,
String? serverName,
String? release,
String? dist,
String? environment,
super.platform,
super.serverName,
super.release,
super.dist,
super.environment,
String? transaction,
dynamic throwable,
Map<String, String>? tags,
@Deprecated(
'Additional Data is deprecated in favor of structured [Contexts] and should be avoided when possible')
Map<String, dynamic>? extra,
SentryUser? user,
Contexts? contexts,
List<Breadcrumb>? breadcrumbs,
SdkVersion? sdk,
SentryRequest? request,
super.user,
super.contexts,
super.breadcrumbs,
super.sdk,
super.request,
String? type,
Map<String, SentryMeasurement>? measurements,
SentryTransactionInfo? transactionInfo,
}) : super(
eventId: eventId,
timestamp: timestamp ?? tracer.endTimestamp,
platform: platform,
serverName: serverName,
release: release,
dist: dist,
environment: environment,
transaction: transaction ?? tracer.name,
throwable: throwable ?? tracer.throwable,
tags: tags ?? tracer.tags,
// ignore: deprecated_member_use_from_same_package
extra: extra ?? tracer.data,
user: user,
contexts: contexts,
breadcrumbs: breadcrumbs,
sdk: sdk,
request: request,
type: _type,
) {
startTimestamp = tracer.startTimestamp;
Expand All @@ -64,7 +53,7 @@ class SentryTransaction extends SentryEvent {
spans = tracer.children;
this.measurements = measurements ?? {};

this.contexts.trace = spanContext.toTraceContext(
contexts.trace = spanContext.toTraceContext(
sampled: tracer.samplingDecision?.sampled,
status: tracer.status,
);
Expand Down
6 changes: 2 additions & 4 deletions dart/lib/src/sentry_attachment/io_sentry_attachment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@ class IoSentryAttachment extends SentryAttachment {
IoSentryAttachment.fromFile(
File file, {
String? filename,
String? attachmentType,
String? contentType,
super.attachmentType,
super.contentType,
}) : super.fromLoader(
loader: () => file.readAsBytes(),
filename: filename ?? file.uri.pathSegments.last,
attachmentType: attachmentType,
contentType: contentType,
);
}
15 changes: 5 additions & 10 deletions dart/lib/src/sentry_transaction_context.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,16 @@ class SentryTransactionContext extends SentrySpanContext {
SentryTransactionContext(
this.name,
String operation, {
String? description,
super.description,
this.parentSamplingDecision,
SentryId? traceId,
SpanId? spanId,
SpanId? parentSpanId,
super.traceId,
super.spanId,
super.parentSpanId,
this.transactionNameSource,
this.samplingDecision,
String? origin,
super.origin,
}) : super(
operation: operation,
description: description,
traceId: traceId,
spanId: spanId,
parentSpanId: parentSpanId,
origin: origin,
);

factory SentryTransactionContext.fromSentryTrace(
Expand Down
1 change: 1 addition & 0 deletions dart/lib/src/utils/sample_rate_format.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ignore: dangling_library_doc_comments
/// Code ported & adapted from `intl` package
/// https://pub.dev/packages/intl
///
Expand Down
2 changes: 1 addition & 1 deletion dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies:
dev_dependencies:
build_runner: ^2.4.2
mockito: ^5.1.0
lints: ^2.0.0
lints: ^3.0.0
test: ^1.21.1
yaml: ^3.1.0 # needed for version match (code and pubspec)
collection: ^1.16.0
Expand Down
Loading