Skip to content

Commit

Permalink
Add suppressions (#202)
Browse files Browse the repository at this point in the history
* Add suppressions

This commit will add suppressions for "Long method"

* Remove enabled detekt methods from yaml file

* Revert detekt changes

* Add Suppress to LanguageSettingsFragment.kt

This commit will add a suppress for long methods in LanguageSettingsFragment.kt

---------

Co-authored-by: Andrew Tavis McAllister <[email protected]>
  • Loading branch information
henrikth93 and andrewtavis authored Oct 17, 2024
1 parent 7b57538 commit 43ec2d7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import be.scri.databinding.FragmentLanguageSettingsBinding
import be.scri.helpers.CustomAdapter
import be.scri.models.SwitchItem

@Suppress("LongMethod")
class LanguageSettingsFragment : Fragment() {
private var _binding: FragmentLanguageSettingsBinding? = null
val binding get() = _binding!!
Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/be/scri/helpers/MyKeyboard.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import java.io.IOException
* @attr ref android.R.styleable#Keyboard_keyWidth
* @attr ref android.R.styleable#Keyboard_horizontalGap
*/
@Suppress("LongMethod")
class MyKeyboard {
/** Horizontal gap default for all rows */
private var mDefaultHorizontalGap = 0
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/be/scri/views/MyKeyboardView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ import java.util.Arrays
import java.util.Locale

@SuppressLint("UseCompatLoadingForDrawables")
@Suppress("LargeClass")
@Suppress("LargeClass", "LongMethod")
class MyKeyboardView
@JvmOverloads
constructor(
Expand Down
14 changes: 7 additions & 7 deletions detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ style:
active: false
ReturnCount:
active: false
# UnusedPrivateProperty:
# active: true
# UnusedParameter:
# active: true
UnusedPrivateProperty:
active: true
UnusedParameter:
active: true
UtilityClassWithPublicConstructor:
active: false

Expand All @@ -26,7 +26,7 @@ complexity:
LongParameterList:
active: false
LongMethod:
active: false
active: true
CyclomaticComplexMethod:
active: false

Expand All @@ -39,8 +39,8 @@ exceptions:
empty-blocks:
EmptyCatchBlock:
active: false
# EmptyFunctionBlock:
# active: false
EmptyFunctionBlock:
active: false

performance:
SpreadOperator:
Expand Down

0 comments on commit 43ec2d7

Please sign in to comment.