Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add instructions on suppressing lint rules #213

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,19 @@ Timber ships with embedded lint rules to detect problems in your app.
Timber.d("Hello " + firstName + " " + lastName + "!");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* **TimberExceptionLogging** (Warning) - Detects the use of null or empty messages, or using the exception message
* **TimberExceptionLogging** (Warning) - Detects the use of null or empty messages, or using the exception message
when logging an exception.

Example.java:35: Warning: Explicitly logging exception message is redundant [TimberExceptionLogging]
Timber.d(e, e.getMessage());
~~~~~~~~~~~~~~

If you wish to suppress the lint rules in your project, add the below gradle configuration:

lintOptions {
disable 'TimberArgCount', 'TimberArgTypes', 'TimberTagLength', 'LogNotTimber', 'StringFormatInTimber', 'BinaryOperationInTimber', 'TimberExceptionLogging', 'ThrowableNotAtBeginning'
}


Download
--------
Expand Down