Sample audits · Open-source projects, first eight

JakeWharton/timber

The logging library used across Android apps, with its lint checks.

Summary card for this audit: 10 findings after review, 0 High, 2 Medium, 3 Low, 5 Info
AuditedJakeWharton/timber at commit 988c9a5917f11e10543df77c18ca3cb754ce9292
Date11 October 2026 (audited again; first audit 11 October 2026)
How it ranlocal run on our workstation, full audit, Standard review
Verdict after reviewPass with notes (Fail if a High finding remains after review, otherwise Pass with notes)
0
High after review
2
Medium after review
3
Low after review
5
Info after review
0
excluded on review

Compared with the first audit

Same commit as the first audit: the project's default branch has no later commits (checked 11 October 2026), so nothing could have been fixed upstream in between. Each finding of the first audit (11 October 2026) was checked again against the code audited now. 18 findings in the first audit; 18 still open (6 found again, 12 not reported again but still present). This audit has 10 findings after review, 4 of them new.

First auditFindingReviewed rating thenNowIn this audit
#1KAPT in lint moduleInfoStill open#1
#2Stale lint baselineInfoStill open#3
#3Sample uses legacy DSLInfoStill opennot reported again
#4Tree list/snapshot sync at 4 sitesInfoStill opennot reported again
#5Format scanner has no size or work limitInfoStill opennot reported again
#6Detector file mixes concernsLowStill open#5
#7Lint test class very largeInfoStill opennot reported again
#8Format-scan loop duplicated, driftedLowStill opennot reported again
#9Tag release publishes without build/testLowStill open#7
#10Duplicate arg-count reportInfoStill opennot reported again
#11Fan-out repetitionInfoStill open#9
#12Release workflow targets nonexistent mosaicMediumStill open#10
#13RELEASING.md contradicts CILowStill opennot reported again
#14Chunking by chars, non-ASCII truncatedLowStill opennot reported again
#15One-shot tag leaks if a tree throwsLowStill opennot reported again
#16Malformed format string throws from log callLowStill opennot reported again
#17Lint false errors on positional argsLowStill opennot reported again
#18Concat quick fix emits unescaped %LowStill opennot reported again
How to read this page

Each finding keeps the number it has in the audit report. The rating shown first is the one after review; the first automated rating is listed with it. 2 findings were first rated Medium or High; 2 of them are Medium or High after review. Text marked "From the report" is quoted from the audit report; fixes are suggestions and were not tested. Code locations link to the file and line at the audited commit.

Medium after review (2)

6. Medium Lint detector matches a companion class name the real library does not have, and its tests use a stub that hides this
First rating: Medium · Reviewed rating: Medium · Review: confirmed · new in this audit
From the report
Evidence
evaluator.isMemberInClass(method, "timber.log.Timber.Companion") ||
Why it matters

The shipped library's companion object is named Forest (actual companion object Forest : Tree() in timber/src/androidMain/kotlin/timber/log/Timber.kt:278; the public API file lists timber/log/Timber$Forest). No timber.log.Timber.Companion class exists, so this check can never match the real library. The tests (WrongTimberUsageDetectorTest.kt:12–29) run against a hand-written stub that declares an unnamed companion object, which is called Companion. They pass whether or not the detector recognizes calls on the real library. If Kotlin call sites resolve to the Forest members, the argument-count, argument-type and exception-logging checks will not run for them, and no test will catch it.

Suggested fix, not tested

Add "timber.log.Timber.Forest" to isTimberLogMethod. Make the test stub match the real API (name the companion Forest), or generate it from the real Timber.kt. Then the tests fail if the names drift again.

Review: The match is at :114, and the real companion is Forest (Timber.kt:278, timber.api lists Timber$Forest). The stub (test :12-29) declares an unnamed, private companion. Extra support: tagTooLongLiteralOnly (test :1102-1144) puts a Kotlin Timber.tag(...) over 23 chars in the files, yet expects only the Java hit. That is consistent with Kotlin calls resolving to the companion class. Not run in real lint, so the real-library effect is by inference. Gaps in the report: the :89 tag-length check has no companion alternative at all, so its fix must cover Forest there too.

10. Medium Release workflow publishes a project directory that does not exist
First rating: Medium · Reviewed rating: Medium · Review: confirmed · also in the first audit (#12)
From the report
Evidence
- run: ./gradlew -p mosaic publish
Why it matters

settings.gradle includes only :timber, :timber-lint and :timber-sample, and no mosaic directory exists in the repository. This looks like a step copied from another project. Every tag push fails at this step, so nothing is published to Maven Central. The later steps that extract release notes, create the GitHub release and deploy the versioned docs never run either.

Suggested fix, not tested

Replace it with ./gradlew publish, the same command build.yaml uses, or with the intended module's publish task. Exercise the release job once, with a dry run or a test tag, before relying on it.

Review: Steps :29-48 follow it. Not run. Affects maintainers' CI path only.

Low after review (3)

4. Low Unreachable PSI branches in the lint type resolver
First rating: Low · Reviewed rating: Low · Review: could not be settled · new in this audit
From the report
Evidence
if (expression is PsiMethodCallExpression) {
  val call = expression as PsiMethodCallExpression
Why it matters

getType receives a UAST UExpression, not a raw PSI node. The PsiMethodCallExpression and PsiLiteralExpression branches, including the special case for getString (lines 342–360), cannot match. A reader would expect getString(...) results to be treated as strings, but that never happens.

Suggested fix, not tested

Handle UCallExpression / ULiteralExpression instead (for example resolve() and check the method name). Or delete the dead branches so the code does not suggest behaviour it does not have.

Review: as dead code. getType takes a UExpression, so is PsiMethodCallExpression (:342) and is PsiLiteralExpression (:349) cannot match a UAST node. The "getString never treated as string" consequence is overstated: the fallback at :362-366 returns the same classes (String, int, float, char, boolean, null), so behaviour is identical.

5. Low Lint detector file mixes several responsibilities in about 930 lines
First rating: Low · Reviewed rating: Low · Review: confirmed · also in the first audit (#6)
From the report
Evidence
class WrongTimberUsageDetector : Detector(), UastScanner {
Why it matters

One class holds call visiting, format-string parsing and type matching (about 330 lines, lines 166–498), quick-fix builders (lines 693–828) and the issue declarations. At this size, changes to one concern are easy to tangle with another, and the format-string logic cannot be tested on its own.

Suggested fix, not tested

Move format-string counting and type checking into a separate helper, and the quick-fix builders into another. The detector keeps only the visit-and-report flow.

7. Low Release workflow publishes without building or testing the tagged commit
First rating: Low · Reviewed rating: Low · Review: confirmed · also in the first audit (#9)
From the report
Evidence
- run: ./gradlew -p mosaic publish
Why it matters

The build workflow skips tags (tags-ignore: '**'), and the release workflow only publishes. A tag on a commit that was never built and tested can reach Maven Central with no test, ABI or lint check on that exact commit.

Suggested fix, not tested

Run ./gradlew build before publish in release.yaml, or make the release job require a green build of the tagged SHA.

Review: Nuance: build.yaml does run on trunk pushes (:6-8), so the commit is usually built, just not as a gate.

Info after review (5)

1. Info Annotation processing still uses KAPT
First rating: Low · Reviewed rating: Info · Review: rated too high · also in the first audit (#1)
Location: timber-lint/build.gradle:2 (and line 18)
From the report
Evidence
apply plugin: 'org.jetbrains.kotlin.kapt'
  kapt libs.auto.service
Why it matters

KAPT is the legacy annotation-processing path for Kotlin. It is slower, has weaker incremental-build support, and is in maintenance mode. Here it is used only to generate the service-registration file for the lint registry.

Suggested fix, not tested

Move to KSP with a KSP-capable service-registration processor. Or drop the processor and hand-write META-INF/services/com.android.tools.lint.client.api.IssueRegistry.

2. Info Jetifier is not explicitly disabled
First rating: Low · Reviewed rating: Info · Review: rated too high · new in this audit
Location: gradle.properties:20. The file has no android.enableJetifier entry, and none was found anywhere in the tree.
From the report
Evidence
org.gradle.jvmargs=-Xmx1536M
Why it matters

The project is fully on AndroidX, so Jetifier does nothing useful. If anything turns it on, it rewrites dependencies on every build and slows builds a lot. Stating the setting makes the intent explicit and independent of plugin defaults.

Suggested fix, not tested

Add android.enableJetifier=false to gradle.properties.

3. Info Committed lint baseline was generated by an older lint version and is stale
First rating: Low · Reviewed rating: Info · Review: rated too high · also in the first audit (#2)
From the report
Evidence
<issues format="6" by="lint 8.12.0" type="baseline" client="gradle" ... version="8.12.0">
Why it matters

The build now uses Android Gradle Plugin 9.4.1, which ships lint tools 32.4.1. The baseline line numbers have also drifted: one entry points at line 760 of the detector, but that text is now at line 850. A baseline from another tool version hides issues and can silently stop matching. The build then either reports issues that were meant to be suppressed or suppresses the wrong ones.

Suggested fix, not tested

Delete and regenerate the baseline in a clean CI build with the lint version in use, and review what it suppresses. Or fix the baselined issues and remove the file.

Review: is the mechanism the earlier review showed wrong: baseline matching uses message and path, not line number)

8. Info The 23-character tag limit is hard-coded in several places
First rating: Low · Reviewed rating: Info · Review: rated too high · new in this audit
Location: timber-lint/src/main/java/timber/lint/WrongTimberUsageDetector.kt:151 (also lines 801, 806 and the issue text at 903)
From the report
Evidence
if (tag != null && tag.length > 23) {
...
val numCharsToTrim = tag.length - 23
Why it matters

The library has its own MAX_TAG_LENGTH = 23 (timber/src/androidMain/kotlin/timber/log/Timber.kt:273), and the lint module repeats the bare number in several places. If the limit or the check logic changes, the copies can drift apart.

Suggested fix, not tested

Declare one named constant in the lint module and use it everywhere there. Add a test that keeps it equal to the library's value.

9. Info Logging overloads are mirrored between the tree and the facade
First rating: Info · Reviewed rating: Info · Review: confirmed · also in the first audit (#11)
From the report
Evidence
@JvmStatic
override fun v(@NonNls message: String?, vararg args: Any?) {
  treeArray.forEach { it.v(message, *args) }

Observation: All 21 level/overload methods appear once in Tree and again in the Forest facade. This is a deliberate public-API and Java-compatibility choice, and the ABI checks enforce it. A short code comment recording this would stop later reviews from flagging it as duplication.

Want this for your code?

Upload a ZIP or link a public GitHub repo, pick the areas and the depth, and get findings by severity with fixes.