Lint Report: 99 warnings
Issue Types

Overview

Correctness
1warning PictureInPictureIssue: Picture In Picture best practices not followed
2warning SelectedPhotoAccess: Behavior change when requesting photo library access
4warning LocalContextResourcesRead: Reading Resources using LocalContext.current.resources
Correctness:Messages
2warning StringFormatCount: Formatting argument types incomplete or inconsistent
Security
1warning AcceptsUserCertificates: Allowing User Certificates
1warning CustomX509TrustManager: Implements custom TLS trust manager
1warning ExportedService: Exported service does not require permission
1warning InsecureBaseConfiguration: Insecure Base Configuration
1warning DataExtractionRules: Missing data extraction rules
Performance
12warning NotifyDataSetChanged: Invalidating All RecyclerView Data
1warning ObsoleteSdkInt: Obsolete SDK_INT Version Check
1warning FrequentlyChangingValue: Reading a value annotated with @FrequentlyChangingValue inside composition
1warning ViewHolder: View Holder Candidates
1warning Overdraw: Overdraw: Painting regions more than once
59warning UnusedResources: Unused resources
1warning UselessParent: Unnecessary parent layout
1warning TooManyViews: Layout has too many views
Productivity
2warning UseKtx: Use KTX extension function
Internationalization
4warning SetTextI18n: TextView Internationalization
Internationalization:Bidirectional Text
2warning RtlHardcoded: Using left/right instead of start/end attributes
Included Additional Checks (90)
Disabled Checks (47)

Picture In Picture best practices not followed

../../src/main/AndroidManifest.xml:83: An activity in this app supports picture-in-picture and the targetSdkVersion is 31 or above; it is therefore strongly recommended to call both setAutoEnterEnabled(true) and setSourceRectHint(...)
  80         android:protectionLevel="signature" />
  81     <uses-permission android:name="${applicationId}.${broadcastPermission}" />
  82 
  83     <application                                                                                    
  84         android:name=".application.NextcloudTalkApplication"
  85         android:allowBackup="true"
  86         android:fullBackupContent="@xml/backup_config"
PictureInPictureIssue Correctness Warning Priority 5/10

Behavior change when requesting photo library access

../../src/main/AndroidManifest.xml:63: Your app is currently not handling Selected Photos Access introduced in Android 14+
  60     <uses-permission
  61         android:name="android.permission.READ_EXTERNAL_STORAGE"
  62         android:maxSdkVersion="32" />
  63     <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />                         
  64     <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
  65     <uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
../../src/main/AndroidManifest.xml:64: Your app is currently not handling Selected Photos Access introduced in Android 14+
  61         android:name="android.permission.READ_EXTERNAL_STORAGE"
  62         android:maxSdkVersion="32" />
  63     <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
  64     <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />                          
  65     <uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
  66 
  67     <uses-permission android:name="android.permission.WAKE_LOCK" />
SelectedPhotoAccess Correctness Warning Priority 5/10

Reading Resources using LocalContext.current.resources

../../src/main/java/com/nextcloud/talk/ui/ComposeChatAdapter.kt:273: Reading Resources using LocalContext.current.resources
  270   val dateString = formatTime(timestamp * LONG_1000)
  271   val color = Color(highEmphasisColorInt)
  272   val backgroundColor =
  273       LocalContext.current.resources.getColor(R.color.bg_message_list_incoming_bubble, null)
  274   Row(
  275       horizontalArrangement = Arrangement.Absolute.Center,
  276       verticalAlignment = Alignment.CenterVertically
../../src/main/java/com/nextcloud/talk/ui/ComposeChatAdapter.kt:453: Reading Resources using LocalContext.current.resources
  450         val incoming = message.actorId != currentUser.userId
  451         val color = if (incoming) {
  452             if (message.isDeleted) {
  453                 LocalContext.current.resources.getColor(                                            
  454                     R.color.bg_message_list_incoming_bubble_deleted,
  455                     null
  456                 )
../../src/main/java/com/nextcloud/talk/ui/ComposeChatAdapter.kt:458: Reading Resources using LocalContext.current.resources
  455                     null
  456                 )
  457             } else {
  458                 LocalContext.current.resources.getColor(                                            
  459                     R.color.bg_message_list_incoming_bubble,
  460                     null
  461                 )
../../src/main/java/com/nextcloud/talk/ui/ComposeChatAdapter.kt:1030: Reading Resources using LocalContext.current.resources
 1027 
 1028   if (cardName?.isNotEmpty() == true) {
 1029       val cardDescription = String.format(
 1030           LocalContext.current.resources.getString(R.string.deck_card_description),
 1031           stackName,
 1032           boardName
 1033       )
Vendor: Jetpack Compose
Identifier: androidx.compose.ui
Feedback: https://issuetracker.google.com/issues/new?component=612128
LocalContextResourcesRead Correctness Warning Priority 3/10

Formatting argument types incomplete or inconsistent

../../src/main/res/values-ug/strings.xml:489: Inconsistent number of arguments in formatting string nc_upload_notification_text; found both 3 here and 0 in values/strings.xml
 486     <string name="nc_upload_from_cloud">%1$s دىن ئورتاقلىشىش</string>
 487     <string name="nc_upload_from_device">ئۈسكۈنىدىن يۈكلەش</string>
 488     <string name="nc_upload_in_progess">يۈكلەش</string>
 489     <string name="nc_upload_notification_text">%1$s دىن%2$s  - %3$s  \ %%</string>                  
 490     <string name="nc_upload_picture_from_cam">رەسىمگە تارتىڭ</string>
 491     <string name="nc_upload_video_from_cam">سىن ئېلىڭ</string>
 492     <string name="nc_user">ئىشلەتكۈچى</string>
    ../../src/main/res/values/strings.xml:590: Conflicting number of arguments (0) here
     587     <string name="nc_upload_from_device">Upload from device</string>
     588     <string name="nc_gallery">Gallery</string>
     589 
     590     <string name="nc_upload_notification_text">%1$s to %2$s - %3$s\%%</string>                      
     591     <string name="nc_upload_failed_notification_title">Failure</string>
     592     <string name="nc_upload_failed_notification_text">Failed to upload %1$s</string>
     593     <string name="nc_file_storage_permission">Permission for file access is required</string>
../../src/main/res/values-sw/strings.xml:543: Inconsistent number of arguments in formatting string nc_upload_notification_text; found both 3 here and 0 in values/strings.xml
 540     <string name="nc_upload_from_cloud">Shirikisha kutoka %1$s</string>
 541     <string name="nc_upload_from_device">Pakia kutoka katika kifaa</string>
 542     <string name="nc_upload_in_progess">Inapakia</string>
 543     <string name="nc_upload_notification_text">%1$skwenda %2$s-%3$s/%%</string>                     
 544     <string name="nc_upload_picture_from_cam">Chukua picha</string>
 545     <string name="nc_upload_video_from_cam">Chukua video</string>
 546     <string name="nc_user">Mtumiaji</string>
    ../../src/main/res/values/strings.xml:590: Conflicting number of arguments (0) here
     587     <string name="nc_upload_from_device">Upload from device</string>
     588     <string name="nc_gallery">Gallery</string>
     589 
     590     <string name="nc_upload_notification_text">%1$s to %2$s - %3$s\%%</string>                      
     591     <string name="nc_upload_failed_notification_title">Failure</string>
     592     <string name="nc_upload_failed_notification_text">Failed to upload %1$s</string>
     593     <string name="nc_file_storage_permission">Permission for file access is required</string>
StringFormatCount Messages Correctness Warning Priority 5/10

Allowing User Certificates

../../src/main/res/xml/network_security_config.xml:12: The Network Security Configuration allows the use of user certificates in the release version of your app
  9     <base-config cleartextTrafficPermitted="true">
 10         <trust-anchors>
 11             <certificates src="system"/>
 12             <certificates src="user"/>                                                              
 13         </trust-anchors>
 14     </base-config>
 15 </network-security-config>
AcceptsUserCertificates Security Warning Priority 5/10

Implements custom TLS trust manager

../../src/main/java/com/nextcloud/talk/utils/ssl/TrustManager.java:35: Implementing a custom X509TrustManager is error-prone and likely to be insecure. It is likely to disable certificate validation altogether, and is non-trivial to implement correctly without calling Android's default implementation.
  32 import javax.net.ssl.X509TrustManager;
  33 
  34 
  35 public class TrustManager implements X509TrustManager {                                             
  36     private static final String TAG = "TrustManager";
  37 
  38     private final File keystoreFile;
CustomX509TrustManager Security Warning Priority 5/10

Exported service does not require permission

../../src/main/AndroidManifest.xml:278: Exported service does not require permission
 275         <receiver android:name=".receivers.DismissRecordingAvailableReceiver" />
 276         <receiver android:name=".receivers.ShareRecordingToChatReceiver" />
 277 
 278         <service                                                                                    
 279             android:name=".utils.SyncService"
 280             android:exported="true">
 281             <intent-filter>
ExportedService Security Warning Priority 5/10

Insecure Base Configuration

../../src/main/res/xml/network_security_config.xml:9: Insecure Base Configuration
  6   ~ SPDX-License-Identifier: GPL-3.0-or-later
  7 -->
  8 <network-security-config>
  9     <base-config cleartextTrafficPermitted="true">                                                  
 10         <trust-anchors>
 11             <certificates src="system"/>
 12             <certificates src="user"/>
InsecureBaseConfiguration Security Warning Priority 5/10

Missing data extraction rules

../../src/main/AndroidManifest.xml:86: The attribute android:fullBackupContent is deprecated from Android 12 and higher and may be removed in future versions. Consider adding the attribute android:dataExtractionRules specifying an @xml resource which configures cloud backups and device transfers on Android 12 and higher.
  83     <application
  84         android:name=".application.NextcloudTalkApplication"
  85         android:allowBackup="true"
  86         android:fullBackupContent="@xml/backup_config"                                              
  87         android:icon="@mipmap/ic_launcher"
  88         android:label="@string/nc_app_name"
  89         android:largeHeap="true"
DataExtractionRules Security Warning Priority 3/10

Invalidating All RecyclerView Data

../../src/main/java/com/nextcloud/talk/chat/ChatActivity.kt:3000: It will always be more efficient to use more specific change events if you can. Rely on notifyDataSetChanged as a last resort.
 2997                     updateReadStatusOfMessage(message, it)
 2998                 }
 2999             }
 3000             adapter!!.notifyDataSetChanged()                                                        
 3001         }
 3002     }
../../src/main/java/com/nextcloud/talk/bottomsheet/items/ListIconDialogAdapter.kt:110: It will always be more efficient to use more specific change events if you can. Rely on notifyDataSetChanged as a last resort.
 107         if (listener != null) {
 108             this.selection = listener
 109         }
 110         this.notifyDataSetChanged()                                                                 
 111     }
 112 
 113     override fun disableItems(indices: IntArray) {
../../src/main/java/com/nextcloud/talk/bottomsheet/items/ListIconDialogAdapter.kt:115: It will always be more efficient to use more specific change events if you can. Rely on notifyDataSetChanged as a last resort.
 112 
 113     override fun disableItems(indices: IntArray) {
 114         this.disabledIndices = indices
 115         notifyDataSetChanged()                                                                      
 116     }
 117 
 118     override fun checkItems(indices: IntArray) = Unit
../../src/main/java/com/nextcloud/talk/polls/adapters/PollCreateOptionsAdapter.kt:43: It will always be more efficient to use more specific change events if you can. Rely on notifyDataSetChanged as a last resort.
 40 
 41     fun updateOptionsList(optionsList: ArrayList<PollCreateOptionItem>) {
 42         list = optionsList
 43         notifyDataSetChanged()                                                                      
 44     }
 45 }
../../src/main/java/com/nextcloud/talk/profile/ProfileActivity.kt:267: It will always be more efficient to use more specific change events if you can. Rely on notifyDataSetChanged as a last resort.
 264 
 265   override fun onNext(userProfileFieldsOverall: UserProfileFieldsOverall) {
 266       editableFields = userProfileFieldsOverall.ocs!!.data!!
 267       adapter!!.notifyDataSetChanged()                                        
 268   }
 269 
 270   override fun onError(e: Throwable) {
NotifyDataSetChanged Performance Warning Priority 8/10

Obsolete SDK_INT Version Check

../../src/main/res/mipmap-anydpi-v26: This folder configuration (v26) is unnecessary; minSdkVersion is 26. Merge all the resources in this folder into mipmap-anydpi.
ObsoleteSdkInt Performance Warning Priority 6/10

Reading a value annotated with @FrequentlyChangingValue inside composition

../../src/main/java/com/nextcloud/talk/ui/ComposeChatAdapter.kt:269: Reading a value annotated with @FrequentlyChangingValue inside composition
  266                       ShimmerGroup()
  267                   }
  268               } else {
  269                   val timestamp = items[listState.firstVisibleItemIndex].timestamp                
  270                   val dateString = formatTime(timestamp * LONG_1000)
  271                   val color = Color(highEmphasisColorInt)
  272                   val backgroundColor =
Vendor: Jetpack Compose
Identifier: androidx.compose.runtime
Feedback: https://issuetracker.google.com/issues/new?component=612128
FrequentlyChangingValue Performance Warning Priority 5/10

View Holder Candidates

../../src/main/java/com/nextcloud/talk/ui/dialog/DialogBanListFragment.kt:61: Unconditional layout inflation from view adapter: Should use View Holder pattern (use recycled view passed into this method as the second parameter) for smoother scrolling
  58        override fun getItemId(position: Int): Long = bans[position].bannedTime!!.toLong()
  59 
  60        override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View {
  61            val binding = BanItemListBinding.inflate(LayoutInflater.from(context))                  
  62            binding.banActorName.text = bans[position].bannedDisplayName
  63            val time = bans[position].bannedTime!!.toLong() * ONE_SEC
  64            binding.banTime.text = DateUtils.formatDateTime(
ViewHolder Performance Warning Priority 5/10

Overdraw: Painting regions more than once

../../src/main/res/layout/activity_account_verification.xml:12: Possible overdraw: Root element paints background @color/bg_default with a theme that also paints a background (inferred theme is @style/AppTheme.Launcher)
  9     xmlns:tools="http://schemas.android.com/tools"
 10     android:layout_width="match_parent"
 11     android:layout_height="match_parent"
 12     android:background="@color/bg_default"                                                          
 13     android:keepScreenOn="true">
 14 
 15     <ProgressBar
Overdraw Performance Warning Priority 3/10

Unused resources

../../src/main/res/drawable/baseline_calendar_month_24.xml:7: The resource R.drawable.baseline_calendar_month_24 appears to be unused
  4   ~ SPDX-FileCopyrightText: 2018-2024 Google LLC
  5   ~ SPDX-License-Identifier: Apache-2.0
  6 -->
  7 <vector xmlns:android="http://schemas.android.com/apk/res/android"                                  
  8     android:width="24dp"
  9     android:height="24dp"
 10     android:tint="#000000"
../../src/main/res/drawable/baseline_report_problem_24.xml:7: The resource R.drawable.baseline_report_problem_24 appears to be unused
  4   ~ SPDX-FileCopyrightText: 2021-2025 Google LLC
  5   ~ SPDX-License-Identifier: Apache-2.0
  6 -->
  7 <vector xmlns:android="http://schemas.android.com/apk/res/android"                                  
  8     android:width="24dp"
  9     android:height="24dp"
 10     android:tint="#000000"
../../src/main/res/drawable/baseline_tag_faces_24.xml:7: The resource R.drawable.baseline_tag_faces_24 appears to be unused
  4   ~ SPDX-FileCopyrightText: 2023-2024 Google LLC
  5   ~ SPDX-License-Identifier: Apache-2.0
  6 -->
  7 <vector xmlns:android="http://schemas.android.com/apk/res/android"                                  
  8     android:height="24dp"
  9     android:tint="#000000"
 10     android:viewportHeight="24"
../../src/main/res/values/bool.xml:10: The resource R.bool.value_false appears to be unused
  7 -->
  8 <resources>
  9     <bool name="value_true">true</bool>
 10     <bool name="value_false">false</bool>                                                           
 11 </resources>
../../src/main/res/layout/dialog_create_conversation.xml:8: The resource R.layout.dialog_create_conversation appears to be unused
  5   ~ SPDX-FileCopyrightText: 2017 Mario Danic <mario@lovelyhq.com>
  6   ~ SPDX-License-Identifier: GPL-3.0-or-later
  7 -->
  8 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"                          
  9     xmlns:app="http://schemas.android.com/apk/res-auto"
 10     xmlns:tools="http://schemas.android.com/tools"
 11     android:layout_width="match_parent"
UnusedResources Performance Warning Priority 3/10

Unnecessary parent layout

../../src/main/res/layout/call_activity.xml:27: This RelativeLayout layout or its LinearLayout parent is possibly unnecessary; transfer the background attribute to the other view
  24         android:layout_height="match_parent"
  25         android:orientation="vertical">
  26 
  27         <RelativeLayout                                                                             
  28             android:id="@+id/conversationRelativeLayout"
  29             android:layout_width="match_parent"
  30             android:layout_height="0dp"
UselessParent Performance Warning Priority 2/10

Layout has too many views

../../src/main/res/layout/activity_settings.xml:614: activity_settings.xml has more than 80 views, bad for performance
 611                    android:layout_height="wrap_content"
 612                    android:text="@string/nc_settings_typing_status_desc"/>
 613 
 614                <com.google.android.material.textview.MaterialTextView                      
 615                    android:id="@+id/settings_typing_status_only_with_hpb"
 616                    android:layout_width="wrap_content"
 617                    android:layout_height="wrap_content"
TooManyViews Performance Warning Priority 1/10

Use KTX extension function

../../src/main/java/com/nextcloud/talk/ui/MicInputCloud.kt:215: Use the KTX extension function Canvas.withSave instead?
 212             rotate(r2, centerX, centerY)
 213             drawPath(ovalTwoPath, bottomCirclePaint)
 214             restore()
 215             save()                                                                                  
 216             rotate(r3, centerX, centerY)
 217             drawPath(ovalThreePath, bottomCirclePaint)
 218             restore()
../../src/main/java/com/nextcloud/talk/ui/WaveformSeekBar.kt:102: Use the KTX extension function Canvas.withSave instead?
  99   val barGap: Float = (usableWidth - waveData.size * DEFAULT_BAR_WIDTH) / (waveData.size - 1).toFloat()
 100 
 101   canvas?.apply {
 102       save()                                                                                  
 103       translate(paddingLeft.toFloat(), paddingTop.toFloat())
 104       for (i in waveData.indices) {
 105           val x: Float = i * (DEFAULT_BAR_WIDTH + barGap) + DEFAULT_BAR_WIDTH / 2f
UseKtx Productivity Warning Priority 6/10

TextView Internationalization

../../src/main/java/com/nextcloud/talk/adapters/items/ConversationItem.kt:309: Number formatting does not take into account locale settings. Consider using String.format instead.
 306   holder.binding.dialogLastMessage.setTypeface(holder.binding.dialogLastMessage.typeface, Typeface.BOLD)
 307   holder.binding.dialogUnreadBubble.visibility = View.VISIBLE
 308   if (model.unreadMessages < UNREAD_MESSAGES_TRESHOLD) {
 309       holder.binding.dialogUnreadBubble.text = model.unreadMessages.toLong().toString()       
 310   } else {
 311       holder.binding.dialogUnreadBubble.setText(R.string.tooManyUnreadMessages)
 312   }
../../src/main/java/com/nextcloud/talk/adapters/messages/Reaction.kt:139: Number formatting does not take into account locale settings. Consider using String.format instead.
 136     ): TextView {
 137         val reactionAmount = TextView(context)
 138         reactionAmount.setTextColor(textColor)
 139         reactionAmount.text = amount.toString()                                                     
 140         reactionAmount.layoutParams = amountParams
 141         return reactionAmount
 142     }
../../src/main/java/com/nextcloud/talk/ui/dialog/ShowReactionsDialog.kt:97: Number formatting does not take into account locale settings. Consider using String.format instead.
  94                 val itemBinding = ItemReactionsTabBinding.inflate(layoutInflater)
  95                 itemBinding.reactionTab.tag = emoji
  96                 itemBinding.reactionIcon.text = emoji
  97                 itemBinding.reactionCount.text = amount.toString()                                  
  98                 tab.customView = itemBinding.root
  99 
 100                 binding.emojiReactionsTabs.addTab(tab)
../../src/main/java/com/nextcloud/talk/ui/dialog/ShowReactionsDialog.kt:108: Number formatting does not take into account locale settings. Consider using String.format instead.
 105          val itemBinding = ItemReactionsTabBinding.inflate(layoutInflater)
 106          itemBinding.reactionTab.tag = tagAll
 107          itemBinding.reactionIcon.text = context.getString(R.string.reactions_tab_all)
 108          itemBinding.reactionCount.text = reactionsTotal.toString()                              
 109          tab.customView = itemBinding.root
 110 
 111          binding.emojiReactionsTabs.addTab(tab, 0)
SetTextI18n Internationalization Warning Priority 6/10

Using left/right instead of start/end attributes

../../src/main/res/layout/dialog_message_actions.xml:118: Consider replacing android:layout_marginLeft with android:layout_marginStart="@dimen/standard_quarter_margin" to better support right-to-left layouts
 115             android:id="@+id/emojiFire"
 116             android:layout_width="@dimen/reaction_bottom_sheet_layout_size"
 117             android:layout_height="@dimen/reaction_bottom_sheet_layout_size"
 118             android:layout_marginLeft="@dimen/standard_quarter_margin"                              
 119             android:layout_marginRight="@dimen/standard_half_margin"
 120             android:cursorVisible="false"
 121             android:gravity="center"
../../src/main/res/layout/dialog_message_actions.xml:119: Consider replacing android:layout_marginRight with android:layout_marginEnd="@dimen/standard_half_margin" to better support right-to-left layouts
 116             android:layout_width="@dimen/reaction_bottom_sheet_layout_size"
 117             android:layout_height="@dimen/reaction_bottom_sheet_layout_size"
 118             android:layout_marginLeft="@dimen/standard_quarter_margin"
 119             android:layout_marginRight="@dimen/standard_half_margin"                                
 120             android:cursorVisible="false"
 121             android:gravity="center"
 122             android:text="@string/emoji_fire"
RtlHardcoded Bidirectional Text Internationalization Warning Priority 5/10

Included Additional Checks

This card lists all the extra checks run by lint, provided from libraries, build configuration and extra flags. This is included to help you verify whether a particular check is included in analysis when configuring builds. (Note that the list does not include the hundreds of built-in checks into lint, only additional ones.)

Disabled Checks

One or more issues were not run by lint, either because the check is not enabled by default, or because it was disabled with a command line flag or via one or more lint.xml configuration files in the project directories.

Suppressing Warnings and Errors

Lint errors can be suppressed in a variety of ways:

1. With a @SuppressLint annotation in the Java code
2. With a tools:ignore attribute in the XML file
3. With a //noinspection comment in the source code
4. With ignore flags specified in the build.gradle file, as explained below
5. With a lint.xml configuration file in the project
6. With a lint.xml configuration file passed to lint via the --config flag
7. With the --ignore flag passed to lint.

To suppress a lint warning with an annotation, add a @SuppressLint("id") annotation on the class, method or variable declaration closest to the warning instance you want to disable. The id can be one or more issue id's, such as "UnusedResources" or {"UnusedResources","UnusedIds"}, or it can be "all" to suppress all lint warnings in the given scope.

To suppress a lint warning with a comment, add a //noinspection id comment on the line before the statement with the error.

To suppress a lint warning in an XML file, add a tools:ignore="id" attribute on the element containing the error, or one of its surrounding elements. You also need to define the namespace for the tools prefix on the root element in your document, next to the xmlns:android declaration:
xmlns:tools="http://schemas.android.com/tools"

To suppress a lint warning in a build.gradle file, add a section like this:
android {
    lintOptions {
        disable 'TypographyFractions','TypographyQuotes'
    }
}

Here we specify a comma separated list of issue id's after the disable command. You can also use warning or error instead of disable to change the severity of issues.

To suppress lint warnings with a configuration XML file, create a file named lint.xml and place it at the root directory of the module in which it applies.

The format of the lint.xml file is something like the following:
<?xml version="1.0" encoding="UTF-8"?>
<lint>
    <!-- Ignore everything in the test source set -->
    <issue id="all">
        <ignore path="\*/test/\*" />
    </issue>

    <!-- Disable this given check in this project -->
    <issue id="IconMissingDensityFolder" severity="ignore" />

    <!-- Ignore the ObsoleteLayoutParam issue in the given files -->
    <issue id="ObsoleteLayoutParam">
        <ignore path="res/layout/activation.xml" />
        <ignore path="res/layout-xlarge/activation.xml" />
        <ignore regexp="(foo|bar)\.java" />
    </issue>

    <!-- Ignore the UselessLeaf issue in the given file -->
    <issue id="UselessLeaf">
        <ignore path="res/layout/main.xml" />
    </issue>

    <!-- Change the severity of hardcoded strings to "error" -->
    <issue id="HardcodedText" severity="error" />
</lint>

To suppress lint checks from the command line, pass the --ignore flag with a comma separated list of ids to be suppressed, such as:
$ lint --ignore UnusedResources,UselessLeaf /my/project/path

For more information, see https://developer.android.com/studio/write/lint.html#config