Skip to content

Commit

Permalink
Analysis: Resolve parameter is never and could be renamed to _ warnings
Browse files Browse the repository at this point in the history
Warning Message: "Parameter 'xyz' is never used, could be renamed to _"

Renaming the parameter 'xyz' that is never used to '_' or removing it
completely is the recommended action to resolve this kind of warnings.
  • Loading branch information
ParaskP7 committed Nov 17, 2022
1 parent 6ba043c commit 0e8e308
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown
temp
}

val emptyEditTextBackspaceDetector = InputFilter { source, start, end, dest, dstart, dend ->
val emptyEditTextBackspaceDetector = InputFilter { source, start, _, _, dstart, dend ->
if (selectionStart == 0 && selectionEnd == 0
&& start == 0
&& dstart == 0 && dend == 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class InlineFormatter(editor: AztecText, val codeStyle: CodeStyle, private val h
fun toggleAny(textFormats: Set<ITextFormat>) {
if (!textFormats
.filter { containsInlineStyle(it) }
.fold(false) { found, containedTextFormat -> removeInlineStyle(containedTextFormat); true }) {
.fold(false) { _, containedTextFormat -> removeInlineStyle(containedTextFormat); true }) {
removeAllExclusiveFormats()
applyInlineStyle(textFormats.first())
}
Expand Down

0 comments on commit 0e8e308

Please sign in to comment.