getsentry / sentry-native

Sentry SDK for C, C++ and native applications.
MIT License
404 stars 170 forks source link

[NDK] Properly apply code formatting #1081

Closed markushi closed 1 week ago

markushi commented 1 week ago

Unfortunately the spotless plugin wasn't applied correctly, so the Java/Kotlin code formatting was incorrect. This PR fixes the mentioned issues and provides a Makefile within the ndk folder, giving us an easy to use make all command.

skip-changelog

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 82.32%. Comparing base (113d261) to head (7723c44). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1081 +/- ## ========================================== - Coverage 82.41% 82.32% -0.10% ========================================== Files 53 53 Lines 7752 7752 Branches 1216 1216 ========================================== - Hits 6389 6382 -7 - Misses 1252 1257 +5 - Partials 111 113 +2 ```

🚨 Try these New Features:

supervacuus commented 1 week ago

Unfortunately the spotless plugin wasn't applied correctly, so the Java/Kotlin code formatting was incorrect. This PR fixes the mentioned issues and provides a Makefile within the ndk folder, giving us an easy to use make all command.

just one question: this only affects sentry-android major 7, right? For 8 sentry-android no longer cares how spotless the ndk folder is, right?

markushi commented 1 week ago

Unfortunately the spotless plugin wasn't applied correctly, so the Java/Kotlin code formatting was incorrect. This PR fixes the mentioned issues and provides a Makefile within the ndk folder, giving us an easy to use make all command.

just one question: this only affects sentry-android major 7, right? For 8 sentry-android no longer cares how spotless the ndk folder is, right?

This change affects none of them, as 7.x isn't using the ndk folder at all (it pulls in an compiles sentry-native directly), and 8.x consumes the pre-built maven artifact.

So the main motivation is to make future changes within the ndk folder easier and more consistent 😊

supervacuus commented 1 week ago

change affects none of them, as 7.x isn't using the ndk folder at all (it pulls in an compiles sentry-native directly)

I understand that, but was it a 7.x build where spotless "saw" the ndk subfolder from the sentry-native submodule that revealed mis-formatted code?

markushi commented 1 week ago

change affects none of them, as 7.x isn't using the ndk folder at all (it pulls in an compiles sentry-native directly)

I understand that, but was it a 7.x build where spotless "saw" the ndk subfolder from the sentry-native submodule that revealed mis-formatted code?

Ah I see, 7.x.x simply ignores the whole sentry-native folder: https://github.com/getsentry/sentry-java/blob/3d24791bd1b80d3dbf8a849d9f23bf14445902c9/build.gradle.kts#L229