Skip to content

Conversation

@AlvaroBrey
Copy link
Member

Port of nextcloud/android-library#932

The old plugin does not check all sourcesets, and is unmaintained.

  • Replace ktlint plugin with Spotless
  • Update pre-commit hook to use spotless for kotlin
  • Move installGitHooks task to root project and fix target dir
  • Update check workflow to use spotless for kotlin
  • build: Fix ktlint call in check task
  • Fix previously undetected ktlint issues
  • Suppress detekt issue brought up by reformatting:
  • Tests written, or not not needed

The original plugin did not check all sourcesets :(

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
@github-actions
Copy link

github-actions bot commented Oct 7, 2022

Codacy

Lint

TypemasterPR
Warnings8585
Errors00

SpotBugs

CategoryBaseNew
Bad practice2929
Correctness4646
Dodgy code354354
Experimental11
Internationalization99
Multithreaded correctness99
Performance5858
Security2828
Total534534

@codecov
Copy link

codecov bot commented Oct 7, 2022

Codecov Report

Merging #10784 (b463c04) into master (0cd828b) will increase coverage by 0.01%.
The diff coverage is 13.46%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #10784      +/-   ##
============================================
+ Coverage     31.60%   31.62%   +0.01%     
- Complexity     3300     3301       +1     
============================================
  Files           539      539              
  Lines         40237    40264      +27     
  Branches       5555     5555              
============================================
+ Hits          12717    12733      +16     
- Misses        25617    25628      +11     
  Partials       1903     1903              
Impacted Files Coverage Δ
...c/main/java/com/nextcloud/client/di/ThemeModule.kt 100.00% <ø> (ø)
...nextcloud/client/errorhandling/ExceptionHandler.kt 0.00% <ø> (ø)
...a/com/nextcloud/client/files/downloader/Request.kt 74.19% <ø> (ø)
.../com/nextcloud/client/jobs/BackgroundJobFactory.kt 63.63% <ø> (ø)
.../nextcloud/client/jobs/BackgroundJobManagerImpl.kt 61.63% <ø> (ø)
...va/com/nextcloud/client/jobs/CalendarBackupWork.kt 0.00% <ø> (ø)
...ava/com/nextcloud/client/logger/ui/LogsActivity.kt 0.00% <ø> (ø)
...xtcloud/client/migrations/MigrationsManagerImpl.kt 77.27% <ø> (ø)
.../nextcloud/utils/view/FastScrollPopupBackground.kt 29.68% <0.00%> (-2.52%) ⬇️
...wncloud/android/datamodel/ContentResolverHelper.kt 37.20% <ø> (ø)
... and 30 more

@github-actions
Copy link

github-actions bot commented Oct 8, 2022

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/10784.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@tobiasKaminsky
Copy link
Member

Very cool!

@AlvaroBrey AlvaroBrey merged commit 64d8b0e into master Oct 10, 2022
@delete-merged-branch delete-merged-branch bot deleted the chore/spotless branch October 10, 2022 12:11
@AlvaroBrey AlvaroBrey added this to the Nextcloud App 3.22.0 milestone Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants