Skip to content

Commit

Permalink
chore: 🤖 [DSY-000] Adjusting some lint warning
Browse files Browse the repository at this point in the history
Fix warnings and preveting break build
  • Loading branch information
mlcsouza committed Jun 23, 2020
1 parent fd95c4a commit e5a603e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions designsystem/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ android {

lintOptions {
baseline file("lint-baseline.xml")
abortOnError false
}

testOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class MenuView @JvmOverloads constructor(
}

private fun setDrawableByIconName(iconName: String) {
val drawableId = context.resources.getIdentifier(iconName?.replace("-", "_"), "drawable", context.packageName)
val drawableId = context.resources.getIdentifier(iconName.replace("-", "_"), "drawable", context.packageName)
if (drawableId == ICON_NOT_FOUND) {
configDefaultIconIfEmpty()
} else {
Expand Down
3 changes: 2 additions & 1 deletion designsystem/src/main/res/layout/ds_menu_view_in_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto">
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">

<com.natura.android.menu.MenuView
android:id="@+id/menuItemBase"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ class MenuViewTest {
fun checksLabelValueWhenMenuInflated() {
val label = layout.menuItemBase.label

assertEquals("Menu item to test", layout.menuItemBase.label)
assertEquals("Menu item to test", label)
}
}

0 comments on commit e5a603e

Please sign in to comment.