Multiple line stat collectors aren't supported
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 129
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
If you try to add multiple LinesOfCodeStatCollectors, only the first one appears to have any effect. In this example, I only see Kotlin files. If I remove the kotlin one, I will see only java files. It seems like despite the unique string keys, duplicate types are still being filtered out.
addStatCollector(
com.squareup.invert.collectors.linesofcode.LinesOfCodeStatCollector(
name = "Kotlin",
fileExtensions = listOf("kt", "kts"),
)
)
addStatCollector(
com.squareup.invert.collectors.linesofcode.LinesOfCodeStatCollector(
name = "Java",
fileExtensions = listOf("java"),
)
)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing addStatCollector and how LinesOfCodeStatCollector instances are registered or filtered, using the Kotlin and Java example in the issue. Confirm that distinct collector names do not prevent duplicate types from being removed; done means both Kotlin and Java files appear when both collectors are added.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100