ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
GNU General Public License v3.0
8.63k stars 2.23k forks source link

Add Ktlint configs to the code style file #11996

Open BrayanDSO opened 2 years ago

BrayanDSO commented 2 years ago

From https://github.com/ankidroid/Anki-Android/issues/9390#issuecomment-950353851

Perhaps if we used one of the plugins (this is most popular: https://github.com/jlleitschuh/ktlint-gradle#additional-helper-tasks) and just integrated it's pre-commit hook (and IDEA style file generation) we'd get editor support for style in Android Studio, and we'd get formatting as a pre-commit hook, and everyone else already using that plugin will have solved all the problems we're cutting our teeth on?

I'd like to see a Proof of concept that killed our pre-commit hook and tried integrating that plugin with it's IDEA style + commit hook)

This PR is only for fixing the pre-commit problem. As I found very reasonable to try using the plugin IDEA style as well and the repo's kotlin code style barely exists, I'll peel it to a separate issue.

Originally posted by @BrayanDSO in https://github.com/ankidroid/Anki-Android/pull/11995#issuecomment-1210459012


Here's the code style file. Related to #11852 as well.

github-actions[bot] commented 2 years ago

Hello ๐Ÿ‘‹, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

github-actions[bot] commented 1 year ago

Hello ๐Ÿ‘‹, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

github-actions[bot] commented 1 year ago

Hello ๐Ÿ‘‹, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

github-actions[bot] commented 1 year ago

Hello ๐Ÿ‘‹, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically