File tree Expand file tree Collapse file tree
RNSentryCocoaTester/RNSentryCocoaTesterTests
react-native-macos/macos/sentry-react-native-sample-macOS
react-native/ios/sentryreactnativesample Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,16 +53,16 @@ jobs:
5353
5454 # Default of ubuntu and apt packages are too old compared to macos packages.
5555 # This is required for using a newer version of clang-format.
56- - name : Setup clang-format V20
56+ - name : Setup clang-format V22
5757 run : |
58- sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" 20
59- sudo apt-get install -y clang-20 clang-format-20 lld-20 lldb-20
58+ sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" 22
59+ sudo apt-get install -y clang-22 clang-format-22 lld-22 lldb-22
6060
61- - name : Set clang-format V20 as default
61+ - name : Set clang-format V22 as default
6262 run : |
63- sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-20 200
64- sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-20 200
65- sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-20 200
63+ sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-22 200
64+ sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-22 200
65+ sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-22 200
6666 clang --version
6767 clang-format --version
6868
Original file line number Diff line number Diff line change @@ -1014,7 +1014,7 @@ - (void)testCreateUserWithPartialGeoDataCreatesSentryGeoObject
10141014 NSDictionary *userKeys =
10151015 @{ @" id" : @" 456" , @" geo" : @ { @" city" : @" New York" , @" country_code" : @" US" } };
10161016
1017- NSDictionary *userDataKeys = @{};
1017+ NSDictionary *userDataKeys = @{ };
10181018
10191019 SentryUser *user = [RNSentry userFrom: userKeys otherUserKeys: userDataKeys];
10201020
@@ -1031,9 +1031,9 @@ - (void)testCreateUserWithPartialGeoDataCreatesSentryGeoObject
10311031
10321032- (void )testCreateUserWithEmptyGeoDataCreatesSentryGeoObject
10331033{
1034- NSDictionary *userKeys = @{ @" id" : @" 789" , @" geo" : @ {} };
1034+ NSDictionary *userKeys = @{ @" id" : @" 789" , @" geo" : @ { } };
10351035
1036- NSDictionary *userDataKeys = @{};
1036+ NSDictionary *userDataKeys = @{ };
10371037
10381038 SentryUser *user = [RNSentry userFrom: userKeys otherUserKeys: userDataKeys];
10391039
@@ -1052,7 +1052,7 @@ - (void)testCreateUserWithoutGeoDataDoesNotCreateGeoObject
10521052{
10531053 NSDictionary *userKeys = @{ @" id" : @" 999" , @" email" : @" test@example.com" };
10541054
1055- NSDictionary *userDataKeys = @{};
1055+ NSDictionary *userDataKeys = @{ };
10561056
10571057 SentryUser *user = [RNSentry userFrom: userKeys otherUserKeys: userDataKeys];
10581058
Original file line number Diff line number Diff line change @@ -51,9 +51,9 @@ - (void)testNullUser
5151- (void )testEmptyUser
5252{
5353 SentryUser *expected = [[SentryUser alloc ] init ];
54- [expected setData: @{}];
54+ [expected setData: @{ }];
5555
56- SentryUser *actual = [RNSentry userFrom: @{} otherUserKeys: @{}];
56+ SentryUser *actual = [RNSentry userFrom: @{ } otherUserKeys: @{ }];
5757 XCTAssertTrue ([actual isEqualToUser: expected]);
5858}
5959
@@ -63,9 +63,9 @@ - (void)testInvalidUser
6363
6464 SentryUser *actual = [RNSentry userFrom: @{
6565 @" id" : @123 ,
66- @" ip_address" : @ {},
67- @" email" : @ {},
68- @" username" : @ {},
66+ @" ip_address" : @ { },
67+ @" email" : @ { },
68+ @" username" : @ { },
6969 }
7070 otherUserKeys: nil ];
7171
@@ -79,9 +79,9 @@ - (void)testPartiallyInvalidUser
7979
8080 SentryUser *actual = [RNSentry userFrom: @{
8181 @" id" : @" 123" ,
82- @" ip_address" : @ {},
83- @" email" : @ {},
84- @" username" : @ {},
82+ @" ip_address" : @ { },
83+ @" email" : @ { },
84+ @" username" : @ { },
8585 }
8686 otherUserKeys: nil ];
8787
@@ -156,7 +156,7 @@ - (void)testUserWithEmptyGeo
156156 SentryGeo *expectedGeo = [SentryGeo alloc ];
157157 [expected setGeo: expectedGeo];
158158
159- SentryUser *actual = [RNSentry userFrom: @{ @" id" : @" 123" , @" geo" : @ {} } otherUserKeys: nil ];
159+ SentryUser *actual = [RNSentry userFrom: @{ @" id" : @" 123" , @" geo" : @ { } } otherUserKeys: nil ];
160160
161161 XCTAssertTrue ([actual isEqualToUser: expected]);
162162}
Original file line number Diff line number Diff line change @@ -299,7 +299,7 @@ - (void)stopObserving
299299- (void )handleShakeDetected
300300{
301301 if (_shakeDetectionEnabled) {
302- [self sendEventWithName: RNSentryOnShakeEvent body: @{}];
302+ [self sendEventWithName: RNSentryOnShakeEvent body: @{ }];
303303 }
304304}
305305
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ + (BOOL)updateOptions:(NSMutableDictionary *)options
2323 }
2424
2525 NSLog (@" Setting up session replay" );
26- NSDictionary *replayOptions = options[@" mobileReplayOptions" ] ?: @{};
26+ NSDictionary *replayOptions = options[@" mobileReplayOptions" ] ?: @{ };
2727
2828 NSString *qualityString = options[@" replaysSessionQuality" ];
2929
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ + (void)start:(NSString *)path configureOptions:(void (^)(SentryOptions *options
6060 if (options == nil ) {
6161 // Fallback in case that options file could not be parsed.
6262 NSError *fallbackError = nil ;
63- options = [PrivateSentrySDKOnly optionsWithDictionary: @{} didFailWithError: &fallbackError];
63+ options = [PrivateSentrySDKOnly optionsWithDictionary: @{ } didFailWithError: &fallbackError];
6464 if (fallbackError != nil ) {
6565 NSLog (@" [RNSentry] Failed to create fallback options with error: %@ " ,
6666 fallbackError.localizedDescription );
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ - (void)applicationDidFinishLaunching:(NSNotification *)notification
99 self.moduleName = @" sentry-react-native-sample" ;
1010 // You can add your custom initial props in the dictionary below.
1111 // They will be passed down to the ViewController used by React Native.
12- self.initialProps = @{};
12+ self.initialProps = @{ };
1313
1414 return [super applicationDidFinishLaunching: notification];
1515}
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ - (BOOL)application:(UIApplication *)application
4747
4848 [self .reactNativeFactory startReactNativeWithModuleName: @" sentry-react-native-sample"
4949 inWindow: self .window
50- initialProperties: @{}
50+ initialProperties: @{ }
5151 launchOptions: launchOptions];
5252
5353 [[UNUserNotificationCenter currentNotificationCenter ] setDelegate: self ];
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ set -eo pipefail
44
55echo " 💡 If you get 'spawn Unknown system error -86', try running this script manually:"
66echo " ./scripts/clang-format.sh $1 "
7- echo " 💡 It is also recommended to use clang-version v20 or v21 ."
7+ echo " 💡 It is also recommended to use clang-format v22 or newer ."
88
99# Prioritize finding clang-format executable from brew since the run-s may introduce X86/ARM64 mismatch.
1010CLANG_FORMAT_PATH=" "
@@ -34,7 +34,7 @@ if ! printf '%s' "$CLANG_MAJOR_VERSION" | grep -qE '^[0-9]+$'; then
3434 exit 1
3535fi
3636
37- REQUIRED_MAJOR=20
37+ REQUIRED_MAJOR=22
3838if [ " $CLANG_MAJOR_VERSION " -lt " $REQUIRED_MAJOR " ]; then
3939 echo " ❌ clang-format major version $CLANG_MAJOR_VERSION is lower than required $REQUIRED_MAJOR "
4040 exit 1
You can’t perform that action at this time.
0 commit comments