Skip to content

Commit

Permalink
ref: One class forward declaration per line (#4643)
Browse files Browse the repository at this point in the history
Change all class forward declarations to one per line.
  • Loading branch information
philipphofmann authored Dec 18, 2024
1 parent cd06244 commit b7c9edb
Show file tree
Hide file tree
Showing 41 changed files with 161 additions and 53 deletions.
9 changes: 7 additions & 2 deletions Sources/Sentry/Public/SentryClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
# import <SentryWithoutUIKit/SentryDefines.h>
#endif

@class SentryOptions, SentryEvent, SentryScope, SentryFileManager, SentryId, SentryUserFeedback,
SentryTransaction;
@class SentryEvent;
@class SentryFileManager;
@class SentryId;
@class SentryOptions;
@class SentryScope;
@class SentryTransaction;
@class SentryUserFeedback;

NS_ASSUME_NONNULL_BEGIN

Expand Down
4 changes: 3 additions & 1 deletion Sources/Sentry/Public/SentryDebugImageProvider.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#import <Foundation/Foundation.h>

@class SentryDebugMeta, SentryThread, SentryFrame;
@class SentryDebugMeta;
@class SentryFrame;
@class SentryThread;

NS_ASSUME_NONNULL_BEGIN

Expand Down
12 changes: 10 additions & 2 deletions Sources/Sentry/Public/SentryEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@

NS_ASSUME_NONNULL_BEGIN

@class SentryThread, SentryException, SentryStacktrace, SentryUser, SentryDebugMeta, SentryContext,
SentryBreadcrumb, SentryId, SentryMessage, SentryRequest;
@class SentryBreadcrumb;
@class SentryContext;
@class SentryDebugMeta;
@class SentryException;
@class SentryId;
@class SentryMessage;
@class SentryRequest;
@class SentryStacktrace;
@class SentryThread;
@class SentryUser;

NS_SWIFT_NAME(Event)
@interface SentryEvent : NSObject <SentrySerializable>
Expand Down
3 changes: 2 additions & 1 deletion Sources/Sentry/Public/SentryException.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

NS_ASSUME_NONNULL_BEGIN

@class SentryStacktrace, SentryMechanism;
@class SentryMechanism;
@class SentryStacktrace;

NS_SWIFT_NAME(Exception)
@interface SentryException : NSObject <SentrySerializable>
Expand Down
10 changes: 8 additions & 2 deletions Sources/Sentry/Public/SentryHub.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@
# import <SentryWithoutUIKit/SentrySpanProtocol.h>
#endif

@class SentryEvent, SentryClient, SentryScope, SentryUser, SentryBreadcrumb, SentryId,
SentryUserFeedback, SentryTransactionContext;
@class SentryBreadcrumb;
@class SentryClient;
@class SentryEvent;
@class SentryId;
@class SentryMetricsAPI;
@class SentryScope;
@class SentryTransactionContext;
@class SentryUser;
@class SentryUserFeedback;

NS_ASSUME_NONNULL_BEGIN
@interface SentryHub : NSObject
Expand Down
3 changes: 2 additions & 1 deletion Sources/Sentry/Public/SentryMechanism.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

NS_ASSUME_NONNULL_BEGIN

@class SentryNSError, SentryMechanismMeta;
@class SentryNSError;
@class SentryMechanismMeta;

NS_SWIFT_NAME(Mechanism)
@interface SentryMechanism : NSObject <SentrySerializable>
Expand Down
7 changes: 5 additions & 2 deletions Sources/Sentry/Public/SentryOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@

NS_ASSUME_NONNULL_BEGIN

@class SentryDsn, SentryMeasurementValue, SentryHttpStatusCodeRange, SentryScope,
SentryReplayOptions;
@class SentryDsn;
@class SentryExperimentalOptions;
@class SentryHttpStatusCodeRange;
@class SentryMeasurementValue;
@class SentryReplayOptions;
@class SentryScope;

NS_SWIFT_NAME(Options)
@interface SentryOptions : NSObject
Expand Down
12 changes: 9 additions & 3 deletions Sources/Sentry/Public/SentrySDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@

@protocol SentrySpan;

@class SentryOptions, SentryEvent, SentryBreadcrumb, SentryScope, SentryUser, SentryId,
SentryUserFeedback, SentryTransactionContext;
@class SentryBreadcrumb;
@class SentryEvent;
@class SentryId;
@class SentryMetricsAPI;
@class UIView;
@class SentryOptions;
@class SentryReplayApi;
@class SentryScope;
@class SentryTransactionContext;
@class SentryUser;
@class SentryUserFeedback;
@class UIView;

NS_ASSUME_NONNULL_BEGIN

Expand Down
5 changes: 4 additions & 1 deletion Sources/Sentry/Public/SentryScope.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
# import <SentryWithoutUIKit/SentrySpanProtocol.h>
#endif

@class SentryUser, SentryOptions, SentryBreadcrumb, SentryAttachment;
@class SentryAttachment;
@class SentryBreadcrumb;
@class SentryOptions;
@class SentryUser;

NS_ASSUME_NONNULL_BEGIN

Expand Down
3 changes: 2 additions & 1 deletion Sources/Sentry/Public/SentrySpanContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

NS_ASSUME_NONNULL_BEGIN

@class SentryId, SentrySpanId;
@class SentryId;
@class SentrySpanId;

static NSString const *SENTRY_TRACE_TYPE = @"trace";

Expand Down
6 changes: 5 additions & 1 deletion Sources/Sentry/Public/SentrySpanProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@

NS_ASSUME_NONNULL_BEGIN

@class SentrySpanId, SentryId, SentryTraceHeader, SentryMeasurementUnit, SentryTraceContext;
@class SentryId;
@class SentryMeasurementUnit;
@class SentrySpanId;
@class SentryTraceContext;
@class SentryTraceHeader;

NS_SWIFT_NAME(Span)
@protocol SentrySpan <SentrySerializable>
Expand Down
6 changes: 5 additions & 1 deletion Sources/Sentry/Public/SentryTraceContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@

NS_ASSUME_NONNULL_BEGIN

@class SentryScope, SentryOptions, SentryTracer, SentryUser, SentryBaggage;
@class SentryBaggage;
@class SentryId;
@class SentryOptions;
@class SentryScope;
@class SentryTracer;
@class SentryUser;

NS_SWIFT_NAME(TraceContext)
@interface SentryTraceContext : NSObject <SentrySerializable>
Expand Down
3 changes: 2 additions & 1 deletion Sources/Sentry/Public/SentryTraceHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
# import <SentryWithoutUIKit/SentrySampleDecision.h>
#endif

@class SentryId, SentrySpanId;
@class SentryId;
@class SentrySpanId;

NS_ASSUME_NONNULL_BEGIN

Expand Down
8 changes: 6 additions & 2 deletions Sources/Sentry/include/SentryAppStateManager.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#import "SentryDefines.h"

@class SentryOptions, SentryCrashWrapper, SentryAppState, SentryFileManager,
SentryDispatchQueueWrapper, SentryNSNotificationCenterWrapper;
@class SentryAppState;
@class SentryCrashWrapper;
@class SentryDispatchQueueWrapper;
@class SentryFileManager;
@class SentryNSNotificationCenterWrapper;
@class SentryOptions;

NS_ASSUME_NONNULL_BEGIN

Expand Down
11 changes: 8 additions & 3 deletions Sources/Sentry/include/SentryClient+Private.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
#import "SentryClient.h"
#import "SentryDataCategory.h"
#import "SentryDiscardReason.h"

@class SentrySession, SentryEnvelopeItem, SentryId, SentryAttachment, SentryThreadInspector,
SentryReplayEvent, SentryReplayRecording, SentryEnvelope;
@class SentryAttachment;
@class SentryEnvelope;
@class SentryEnvelopeItem;
@class SentryId;
@class SentryReplayEvent;
@class SentryReplayRecording;
@class SentrySession;
@class SentryThreadInspector;

NS_ASSUME_NONNULL_BEGIN

Expand Down
3 changes: 2 additions & 1 deletion Sources/Sentry/include/SentryCoreDataTracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ NS_ASSUME_NONNULL_BEGIN
static NSString *const SENTRY_COREDATA_FETCH_OPERATION = @"db.sql.query";
static NSString *const SENTRY_COREDATA_SAVE_OPERATION = @"db.sql.transaction";

@class SentryThreadInspector, SentryNSProcessInfoWrapper;
@class SentryNSProcessInfoWrapper;
@class SentryThreadInspector;

@interface SentryCoreDataTracker : NSObject
SENTRY_NO_INIT
Expand Down
4 changes: 3 additions & 1 deletion Sources/Sentry/include/SentryCrashInstallationReporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
#import "SentryDefines.h"
#import <Foundation/Foundation.h>

@class SentryInAppLogic, SentryCrashWrapper, SentryDispatchQueueWrapper;
@class SentryCrashWrapper;
@class SentryDispatchQueueWrapper;
@class SentryInAppLogic;

NS_ASSUME_NONNULL_BEGIN

Expand Down
3 changes: 2 additions & 1 deletion Sources/Sentry/include/SentryCrashIntegration.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

NS_ASSUME_NONNULL_BEGIN

@class SentryScope, SentryCrashWrapper;
@class SentryCrashWrapper;
@class SentryScope;

static NSString *const SentryDeviceContextFreeMemoryKey = @"free_memory";
static NSString *const SentryDeviceContextAppMemoryKey = @"app_memory";
Expand Down
3 changes: 2 additions & 1 deletion Sources/Sentry/include/SentryCrashReportConverter.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#import <Foundation/Foundation.h>

@class SentryEvent, SentryInAppLogic;
@class SentryEvent;
@class SentryInAppLogic;

NS_ASSUME_NONNULL_BEGIN

Expand Down
4 changes: 3 additions & 1 deletion Sources/Sentry/include/SentryCrashReportSink.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
#import "SentryDefines.h"
#import <Foundation/Foundation.h>

@class SentryInAppLogic, SentryCrashWrapper, SentryDispatchQueueWrapper;
@class SentryCrashWrapper;
@class SentryDispatchQueueWrapper;
@class SentryInAppLogic;

NS_ASSUME_NONNULL_BEGIN

Expand Down
3 changes: 2 additions & 1 deletion Sources/Sentry/include/SentryCrashStackEntryMapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#import "SentryDefines.h"
#import <Foundation/Foundation.h>

@class SentryFrame, SentryInAppLogic;
@class SentryFrame;
@class SentryInAppLogic;

NS_ASSUME_NONNULL_BEGIN

Expand Down
3 changes: 2 additions & 1 deletion Sources/Sentry/include/SentryEnvelopeRateLimit.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

@protocol SentryEnvelopeRateLimitDelegate;

@class SentryEnvelope, SentryEnvelopeItem;
@class SentryEnvelope;
@class SentryEnvelopeItem;

NS_ASSUME_NONNULL_BEGIN

Expand Down
4 changes: 3 additions & 1 deletion Sources/Sentry/include/SentryHttpTransport.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
#import "SentryTransport.h"
#import <Foundation/Foundation.h>

@class SentryOptions, SentryDispatchQueueWrapper, SentryNSURLRequestBuilder;
@class SentryDispatchQueueWrapper;
@class SentryNSURLRequestBuilder;
@class SentryOptions;

NS_ASSUME_NONNULL_BEGIN

Expand Down
3 changes: 2 additions & 1 deletion Sources/Sentry/include/SentryNSDataTracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ static NSString *const SENTRY_FILE_WRITE_OPERATION = @"file.write";

static NSString *const SENTRY_FILE_READ_OPERATION = @"file.read";

@class SentryThreadInspector, SentryNSProcessInfoWrapper;
@class SentryNSProcessInfoWrapper;
@class SentryThreadInspector;

@interface SentryNSDataTracker : NSObject
SENTRY_NO_INIT
Expand Down
3 changes: 2 additions & 1 deletion Sources/Sentry/include/SentryNSURLRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

NS_ASSUME_NONNULL_BEGIN

@class SentryDsn, SentryEvent;
@class SentryDsn;
@class SentryEvent;

@interface SentryNSURLRequest : NSMutableURLRequest

Expand Down
3 changes: 2 additions & 1 deletion Sources/Sentry/include/SentryNSURLRequestBuilder.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#import <Foundation/Foundation.h>

@class SentryEnvelope, SentryDsn;
@class SentryDsn;
@class SentryEnvelope;

NS_ASSUME_NONNULL_BEGIN

Expand Down
3 changes: 2 additions & 1 deletion Sources/Sentry/include/SentryProfiledTracerConcurrency.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#import "SentryProfilingConditionals.h"
#import <Foundation/Foundation.h>

@class SentryProfiler, SentryId;
@class SentryId;
@class SentryProfiler;

#if SENTRY_TARGET_PROFILING_SUPPORTED

Expand Down
5 changes: 4 additions & 1 deletion Sources/Sentry/include/SentrySerialization.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#import "SentryDefines.h"

@class SentrySession, SentryEnvelope, SentryAppState, SentryReplayRecording;
@class SentryAppState;
@class SentryEnvelope;
@class SentryReplayRecording;
@class SentrySession;

NS_ASSUME_NONNULL_BEGIN

Expand Down
4 changes: 3 additions & 1 deletion Sources/Sentry/include/SentrySessionCrashedHandler.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#import "SentryDefines.h"
#import <Foundation/Foundation.h>

@class SentryCrashWrapper, SentryDispatchQueueWrapper;
@class SentryCrashWrapper;
@class SentryDispatchQueueWrapper;

#if SENTRY_HAS_UIKIT
@class SentryWatchdogTerminationLogic;
#endif // SENTRY_HAS_UIKIT
Expand Down
5 changes: 4 additions & 1 deletion Sources/Sentry/include/SentrySessionTracker.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#import "SentryDefines.h"
#import <Foundation/Foundation.h>

@class SentryEvent, SentryOptions, SentryCurrentDateProvider, SentryNSNotificationCenterWrapper;
@class SentryCurrentDateProvider;
@class SentryEvent;
@class SentryNSNotificationCenterWrapper;
@class SentryOptions;

/**
* Tracks sessions for release health. For more info see:
Expand Down
6 changes: 5 additions & 1 deletion Sources/Sentry/include/SentrySpan.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

NS_ASSUME_NONNULL_BEGIN

@class SentryTracer, SentryId, SentrySpanId, SentryFrame, SentrySpanContext;
@class SentryFrame;
@class SentryId;
@class SentrySpanContext;
@class SentrySpanId;
@class SentryTracer;

#if SENTRY_HAS_UIKIT
@class SentryFramesTracker;
Expand Down
4 changes: 3 additions & 1 deletion Sources/Sentry/include/SentrySpotlightTransport.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
#import "SentryRequestManager.h"
#import "SentryTransport.h"

@class SentryOptions, SentryDispatchQueueWrapper, SentryNSURLRequestBuilder;
@class SentryDispatchQueueWrapper;
@class SentryNSURLRequestBuilder;
@class SentryOptions;

NS_ASSUME_NONNULL_BEGIN

Expand Down
4 changes: 3 additions & 1 deletion Sources/Sentry/include/SentryStacktraceBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
#import "SentryDefines.h"
#import <Foundation/Foundation.h>

@class SentryStacktrace, SentryFrameRemover, SentryCrashStackEntryMapper;
@class SentryCrashStackEntryMapper;
@class SentryFrameRemover;
@class SentryStacktrace;

NS_ASSUME_NONNULL_BEGIN

Expand Down
Loading

0 comments on commit b7c9edb

Please sign in to comment.