RUM-10363: Add PreferTimeProvider.kt detekt rule#3096
Merged
Conversation
kikoveiga
force-pushed
the
kikoveiga/RUM-10363/add-detekt-rule
branch
from
January 2, 2026 17:11
b6e315b to
d5f1117
Compare
|
🎯 Code Coverage 🔗 Commit SHA: 9e34f78 | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3096 +/- ##
===========================================
+ Coverage 71.40% 71.43% +0.03%
===========================================
Files 881 880 -1
Lines 32460 32480 +20
Branches 5466 5473 +7
===========================================
+ Hits 23178 23201 +23
- Misses 7729 7739 +10
+ Partials 1553 1540 -13
🚀 New features to boost your workflow:
|
kikoveiga
marked this pull request as ready for review
January 2, 2026 17:53
0xnm
previously approved these changes
Jan 5, 2026
ambushwork
previously approved these changes
Jan 5, 2026
kikoveiga
force-pushed
the
kikoveiga/RUM-10363/add-detekt-rule
branch
from
January 5, 2026 16:41
6f811ab to
7223a54
Compare
kikoveiga
force-pushed
the
kikoveiga/RUM-10363/add-detekt-rule
branch
from
January 5, 2026 17:24
7223a54 to
0f09026
Compare
kikoveiga
force-pushed
the
kikoveiga/RUM-10363/add-detekt-rule
branch
from
January 5, 2026 17:45
0f09026 to
368c257
Compare
kikoveiga
force-pushed
the
kikoveiga/RUM-10363/add-detekt-rule
branch
from
January 5, 2026 21:53
52b869a to
9e34f78
Compare
0xnm
approved these changes
Jan 6, 2026
| """.trimIndent() | ||
|
|
||
| val findings = PreferTimeProvider(config).lint(code) | ||
| assertThat(findings).hasSize(0) |
Member
There was a problem hiding this comment.
very nit, no need to change: for the empty case there is also isEmpty assertion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a detekt rule to enforce the usage of the
TimeProviderinterface rather thanSystemtime calls in production code.Motivation
Guarantee code is coherent and testable.
Review checklist (to be filled by reviewers)