-
Notifications
You must be signed in to change notification settings - Fork 3
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
Set up KtLint #71
Set up KtLint #71
Conversation
@shubertm Could you describe the changes in this PR please? |
# Conflicts: # app/build.gradle # app/src/main/java/dev/arkbuilders/arkmemo/App.kt # app/src/main/java/dev/arkbuilders/arkmemo/graphics/SVG.kt # app/src/main/java/dev/arkbuilders/arkmemo/media/ArkAudioRecorderImpl.kt # app/src/main/java/dev/arkbuilders/arkmemo/media/ArkMediaPlayer.kt # app/src/main/java/dev/arkbuilders/arkmemo/media/ArkMediaPlayerImpl.kt # app/src/main/java/dev/arkbuilders/arkmemo/models/GraphicNote.kt # app/src/main/java/dev/arkbuilders/arkmemo/models/SaveNoteResult.kt # app/src/main/java/dev/arkbuilders/arkmemo/models/TextNote.kt # app/src/main/java/dev/arkbuilders/arkmemo/models/VoiceNote.kt # app/src/main/java/dev/arkbuilders/arkmemo/preferences/MemoPreferences.kt # app/src/main/java/dev/arkbuilders/arkmemo/preferences/MemoPreferencesImpl.kt # app/src/main/java/dev/arkbuilders/arkmemo/repo/NotesRepoHelper.kt # app/src/main/java/dev/arkbuilders/arkmemo/repo/graphics/GraphicNotesRepo.kt # app/src/main/java/dev/arkbuilders/arkmemo/repo/text/TextNotesRepo.kt # app/src/main/java/dev/arkbuilders/arkmemo/repo/voices/VoiceNotesRepo.kt # app/src/main/java/dev/arkbuilders/arkmemo/ui/activities/MainActivity.kt # app/src/main/java/dev/arkbuilders/arkmemo/ui/adapters/NotesListAdapter.kt # app/src/main/java/dev/arkbuilders/arkmemo/ui/dialogs/NoteDeleteDialog.kt # app/src/main/java/dev/arkbuilders/arkmemo/ui/fragments/ArkMediaPlayerFragment.kt # app/src/main/java/dev/arkbuilders/arkmemo/ui/fragments/ArkRecorderFragment.kt # app/src/main/java/dev/arkbuilders/arkmemo/ui/fragments/BaseEditNoteFragment.kt # app/src/main/java/dev/arkbuilders/arkmemo/ui/fragments/EditGraphicNotesFragment.kt # app/src/main/java/dev/arkbuilders/arkmemo/ui/fragments/EditTextNotesFragment.kt # app/src/main/java/dev/arkbuilders/arkmemo/ui/fragments/NotesFragment.kt # app/src/main/java/dev/arkbuilders/arkmemo/ui/fragments/SettingsFragment.kt # app/src/main/java/dev/arkbuilders/arkmemo/ui/viewmodels/ArkMediaPlayerViewModel.kt # app/src/main/java/dev/arkbuilders/arkmemo/ui/viewmodels/ArkRecorderViewModel.kt # app/src/main/java/dev/arkbuilders/arkmemo/ui/viewmodels/GraphicNotesViewModel.kt # app/src/main/java/dev/arkbuilders/arkmemo/ui/viewmodels/NotesViewModel.kt # app/src/main/java/dev/arkbuilders/arkmemo/ui/views/NotesCanvas.kt # app/src/main/java/dev/arkbuilders/arkmemo/ui/views/WaveView.kt # app/src/main/java/dev/arkbuilders/arkmemo/utils/Config.kt # app/src/main/java/dev/arkbuilders/arkmemo/utils/NoteExt.kt # app/src/main/java/dev/arkbuilders/arkmemo/utils/Utils.kt # build.gradle
@@ -10,6 +10,7 @@ | |||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> | |||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> | |||
<uses-permission android:name="android.permission.RECORD_AUDIO"/> | |||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shubertm For which reason do we need this permission?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can check the lint error here https://github.com/ARK-Builders/ARK-Memo/actions/runs/11668539341/job/32488691548. Seems glide posts some notifications. Yet am not really sure
Intent(Intent.ACTION_VIEW).setData(Uri.parse(url))) | ||
Intent(Intent.ACTION_VIEW).setData(Uri.parse(url)), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shubertm I don't see the point of adding an extra comma to the end of this line, or in any other parameterized blocks.
Could you elaborate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to change the ktlint rules for trailing commas. Disallow them
The aim of this PR is to enforce Kotlin code style across Memo developers using KtLint plugin.And this makes it easier for new developers too, they can concentrate on solving the actual problem instead of spending much time on formatting code. In most ARK Kotlin repos we are using https://github.com/JLLeitschuh/ktlint-gradle, here as well