Skip to content
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

107 fix detekt too many functions #203

Closed

Conversation

growabeard
Copy link
Collaborator

Contributor checklist


Description

This PR is a WIP attempt to fix the TooManyFunctions detekt metric.

To test, I ran the application locally and attempted to use the app and the keyboard.

Previously it was at 27 issues, and I have reduced that down to 5.

This is a large PR, I understand. Most of the code was unused. Some of it was restructured to add layers of inheritance.

The remaining offenders are
-MyKeyboardView: 30 functions
-BaseSimpleActivity: 27 functions
-SimpleKeyboardIME: 21 functions
-ContextStorage: 15 functions
-SettingsFragment: 13 functions

I'm not sure if we should add suppression annotations to these classes or if I should proceed and try to whittle this down further.

Related issue

Copy link

github-actions bot commented Oct 16, 2024

Thank you for the pull request!

The Scribe team will do our best to address your contribution as soon as we can. The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and Android rooms once you're in. Also consider joining our bi-weekly Saturday dev syncs. It'd be great to have you!

Maintainer checklist

  • The linting and formatting workflows within the PR checks do not indicate new errors in the files changed

  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

@andrewtavis
Copy link
Member

CC @angrezichatterbox for #200 that came out of our discussions :)

@andrewtavis
Copy link
Member

Let us know when this is ready, @growabeard, and really thanks so much 😊

@andrewtavis andrewtavis added the hacktoberfest-accepted Accepted as a part of Hacktoberfest label Oct 16, 2024
@angrezichatterbox
Copy link
Member

I guess this PR would fix most of #200 along with my PR :)

…s' into 107-fix-detekt-too-many-functions

# Conflicts:
#	app/src/main/java/be/scri/activities/BaseSimpleActivity.kt
#	app/src/main/java/be/scri/activities/BaseSplashActivity.kt
#	app/src/main/java/be/scri/extensions/Activity.kt
#	app/src/main/java/be/scri/extensions/CommonsContext.kt
#	app/src/main/java/be/scri/extensions/ContextStorage.kt
#	app/src/main/java/be/scri/extensions/ContextStorageSdk30.kt
#	app/src/main/java/be/scri/extensions/ContextStyling.kt
#	app/src/main/java/be/scri/extensions/Cursor.kt
#	app/src/main/java/be/scri/extensions/Drawable.kt
#	app/src/main/java/be/scri/extensions/EditText.kt
#	app/src/main/java/be/scri/extensions/Int.kt
#	app/src/main/java/be/scri/extensions/Resources.kt
#	app/src/main/java/be/scri/extensions/String.kt
#	app/src/main/java/be/scri/fragments/AboutFragment.kt
#	app/src/main/java/be/scri/fragments/LanguageSettingsFragment.kt
#	app/src/main/java/be/scri/fragments/SettingsFragment.kt
#	app/src/main/java/be/scri/helpers/BaseConfig.kt
#	app/src/main/java/be/scri/helpers/CommonsConstants.kt
#	app/src/main/java/be/scri/helpers/Constants.kt
#	app/src/main/java/be/scri/helpers/MyContentProvider.kt
#	app/src/main/java/be/scri/services/EnglishKeyboardIME.kt
#	app/src/main/java/be/scri/services/FrenchKeyboardIME.kt
#	app/src/main/java/be/scri/services/GermanKeyboardIME.kt
#	app/src/main/java/be/scri/services/ItalianKeyboardIME.kt
#	app/src/main/java/be/scri/services/PortugueseKeyboardIME.kt
#	app/src/main/java/be/scri/services/RussianKeyboardIME.kt
#	app/src/main/java/be/scri/services/ScribeKeyboardIME.kt
#	app/src/main/java/be/scri/services/SpanishKeyboardIME.kt
#	app/src/main/java/be/scri/services/SwedishKeyboardIME.kt
#	app/src/main/java/be/scri/views/MyKeyboardView.kt
@growabeard
Copy link
Collaborator Author

Closing this PR and I will split into multiple more manageable PRs.

@growabeard growabeard deleted the 107-fix-detekt-too-many-functions branch October 28, 2024 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Accepted as a part of Hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants