JakeWharton / JakeWharton/timber

Timber lint check does not consider formatting string using indexing for backreferences

Open
#167 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
10.8k
Forks
994
Avg merge
17h 16m
Merged PRs (30d)
17

Description

Given code:

`Timber.d("setMeasuredDimension(%d, %1$d)", size);`
or
`Timber.d("setMeasuredDimension(%1$d, %1$d)", size);`

Actual result:
Lint warns about invalid argument count for formatting string
Lint outputs:
zrzut ekranu 2016-09-21 o 18 29 27

Actual result:
No lint warning with proper format string including backreferences

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the Timber lint check that validates formatting-string argument counts, then reproduce the issue with the two Java snippets in the report. The fix is done when indexed backreferences such as %1$d no longer produce false warnings while genuinely invalid argument counts still do.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.