Skip to content

Commit

Permalink
Update plugin codequalitytools to v0.24.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vanniktech committed Dec 10, 2023
1 parent d4ef6f0 commit 4b61d7d
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 39 deletions.
12 changes: 8 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
[*.{kt,kts}]
ktlint_code_style=intellij_idea
indent_size=2
continuation_indent_size=2
insert_final_newline=true
ij_kotlin_allow_trailing_comma=true
ij_kotlin_allow_trailing_comma_on_call_site=true
insert_final_newline=true
ktlint_standard_annotation=disabled
ktlint_standard_argument-list-wrapping=disabled
ktlint_standard_spacing-between-declarations-with-annotations=disabled
ktlint_standard_max-line-length=disabled
ktlint_standard_filename=disabled
ktlint_standard_property-naming=disabled
ktlint_standard_discouraged-comment-location=disabled
ktlint_standard_class-signature=disabled
ktlint_standard_spacing-between-declarations-with-annotations=disabled
ktlint_standard_argument-list-wrapping=disabled
ktlint_experimental=enabled
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ codeQualityTools {
}
ktlint {
toolVersion = libs.versions.ktlint.get()
experimental = true
}
detekt {
enabled = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,5 @@ import com.vanniktech.emoji.Parcelize
return result
}

override fun toString(): String {
return "FacebookEmoji(unicode='$unicode', shortcodes=$shortcodes, x=$x, y=$y, isDuplicate=$isDuplicate, variants=$variants)"
}
override fun toString() = "FacebookEmoji(unicode='$unicode', shortcodes=$shortcodes, x=$x, y=$y, isDuplicate=$isDuplicate, variants=$variants)"
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ internal class GoogleCompatEmojiDrawable(
}

@Suppress("OVERRIDE_DEPRECATION")
override fun getOpacity(): Int {
return PixelFormat.UNKNOWN
}
override fun getOpacity(): Int = PixelFormat.UNKNOWN

internal companion object {
private const val TEXT_SIZE_FACTOR = 0.8f
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ import com.vanniktech.emoji.Parcelize
return true
}

override fun toString(): String {
return "GoogleCompatEmoji(unicode='$unicode', shortcodes=$shortcodes, isDuplicate=$isDuplicate, variants=$variants)"
}
override fun toString() = "GoogleCompatEmoji(unicode='$unicode', shortcodes=$shortcodes, isDuplicate=$isDuplicate, variants=$variants)"

override fun hashCode(): Int {
var result = unicode.hashCode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,5 @@ import com.vanniktech.emoji.Parcelize
return result
}

override fun toString(): String {
return "GoogleEmoji(unicode='$unicode', shortcodes=$shortcodes, x=$x, y=$y, isDuplicate=$isDuplicate, variants=$variants)"
}
override fun toString() = "GoogleEmoji(unicode='$unicode', shortcodes=$shortcodes, x=$x, y=$y, isDuplicate=$isDuplicate, variants=$variants)"
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,5 @@ import com.vanniktech.emoji.Parcelize
return result
}

override fun toString(): String {
return "IosEmoji(unicode='$unicode', shortcodes=$shortcodes, x=$x, y=$y, isDuplicate=$isDuplicate, variants=$variants)"
}
override fun toString() = "IosEmoji(unicode='$unicode', shortcodes=$shortcodes, x=$x, y=$y, isDuplicate=$isDuplicate, variants=$variants)"
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,5 @@ import com.vanniktech.emoji.Parcelize
return result
}

override fun toString(): String {
return "TwitterEmoji(unicode='$unicode', shortcodes=$shortcodes, x=$x, y=$y, isDuplicate=$isDuplicate, variants=$variants)"
}
override fun toString() = "TwitterEmoji(unicode='$unicode', shortcodes=$shortcodes, x=$x, y=$y, isDuplicate=$isDuplicate, variants=$variants)"
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ import com.vanniktech.emoji.isOnlyEmojis

/** InputFilter that only accepts emojis. */
class OnlyEmojisInputFilter : InputFilter {
override fun filter(source: CharSequence, start: Int, end: Int, dest: Spanned, dstart: Int, dend: Int): CharSequence? {
return when {
!source.subSequence(start, end).isOnlyEmojis() -> "" // Reject.
else -> null
}
override fun filter(source: CharSequence, start: Int, end: Int, dest: Spanned, dstart: Int, dend: Int): CharSequence? = when {
!source.subSequence(start, end).isOnlyEmojis() -> "" // Reject.
else -> null
}
}
4 changes: 1 addition & 3 deletions generator/template/Emoji.kt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,5 @@ import com.vanniktech.emoji.Parcelize
return result
}

override fun toString(): String {
return "<%= name %>(unicode='$unicode', shortcodes=$shortcodes, x=$x, y=$y, isDuplicate=$isDuplicate, variants=$variants)"
}
override fun toString() = "<%= name %>(unicode='$unicode', shortcodes=$shortcodes, x=$x, y=$y, isDuplicate=$isDuplicate, variants=$variants)"
}
4 changes: 1 addition & 3 deletions generator/template/EmojiCompat.kt
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ import com.vanniktech.emoji.Parcelize
return true
}

override fun toString(): String {
return "<%= name %>(unicode='$unicode', shortcodes=$shortcodes, isDuplicate=$isDuplicate, variants=$variants)"
}
override fun toString() = "<%= name %>(unicode='$unicode', shortcodes=$shortcodes, isDuplicate=$isDuplicate, variants=$variants)"

override fun hashCode(): Int {
var result = unicode.hashCode()
Expand Down
8 changes: 4 additions & 4 deletions generator/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ imagemin-pngquant@^9.0.2:
execa "^4.0.0"
is-png "^2.0.0"
is-stream "^2.0.0"
ow "^0.17.0"
ow "^0.18.0-SNAPSHOT"
pngquant-bin "^6.0.0"

imagemin-zopfli@^7.0.0:
Expand Down Expand Up @@ -1684,9 +1684,9 @@ os-filter-obj@^2.0.0:
dependencies:
arch "^2.1.0"

ow@^0.17.0:
version "0.17.0"
resolved "https://registry.npmjs.org/ow/-/ow-0.17.0.tgz"
ow@^0.18.0-SNAPSHOT:
version "0.18.0-SNAPSHOT"
resolved "https://registry.npmjs.org/ow/-/ow-0.18.0-SNAPSHOT.tgz"
integrity sha512-i3keDzDQP5lWIe4oODyDFey1qVrq2hXKTuTH2VpqwpYtzPiKZt2ziRI4NBQmgW40AnV5Euz17OyWweCb+bNEQA==
dependencies:
type-fest "^0.11.0"
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ targetSdk = "33"

androidgradleplugin = "8.1.1"
kotlin = "1.8.22"
ktlint = "0.50.0"
ktlint = "1.0.1"

[libraries]
androidx-appcompat = { module = "androidx.appcompat:appcompat", version = "1.6.1" }
Expand Down

0 comments on commit 4b61d7d

Please sign in to comment.