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

Remove check for deprectated functions toUpperCase and toLowerCase #6548

Merged
merged 1 commit into from Nov 9, 2023

Conversation

Gosunet
Copy link
Contributor

@Gosunet Gosunet commented Oct 15, 2023

toUpperCase and toLowerCase are deprecated, the ImplicitDefaultLocale should not check usage for them anymore

Closes #6343

@codecov
Copy link

codecov bot commented Oct 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (780fd3a) 85.10% compared to head (acc0f1e) 85.11%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #6548   +/-   ##
=========================================
  Coverage     85.10%   85.11%           
+ Complexity     4083     4079    -4     
=========================================
  Files           570      570           
  Lines         13376    13363   -13     
  Branches       2406     2401    -5     
=========================================
- Hits          11384    11374   -10     
  Misses          792      792           
+ Partials       1200     1197    -3     
Files Coverage Δ
...urbosch/detekt/rules/bugs/ImplicitDefaultLocale.kt 68.75% <ø> (-2.37%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@cortinico cortinico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo a minor nit

@@ -33,17 +30,13 @@ import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe
* "Timestamp: %d".format(System.currentTimeMillis())
*
* val str: String = getString()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this line also

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@@ -33,17 +30,13 @@ import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe
* "Timestamp: %d".format(System.currentTimeMillis())
*
* val str: String = getString()
* str.toUpperCase()
* str.toLowerCase()
* </noncompliant>
*
* <compliant>
* String.format(Locale.US, "Timestamp: %d", System.currentTimeMillis())
* "Timestamp: %d".format(Locale.US, System.currentTimeMillis())
*
* val str: String = getString()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this line also

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toUpperCase and toLowerCase are deprecated, the ImplicitDefaultLocale should not check usage for them anymore

Closes detekt#6343
@BraisGabin BraisGabin added the pick request Marker for PRs that should be ported to the 1.0 release branch label Nov 9, 2023
@BraisGabin BraisGabin added this to the 2.0.0 milestone Nov 9, 2023
@BraisGabin BraisGabin enabled auto-merge (squash) November 9, 2023 13:44
@BraisGabin BraisGabin merged commit 100b2f7 into detekt:main Nov 9, 2023
23 checks passed
cortinico pushed a commit that referenced this pull request Nov 25, 2023
…6548)

toUpperCase and toLowerCase are deprecated, the ImplicitDefaultLocale should not check usage for them anymore

Closes #6343
mgroth0 pushed a commit to mgroth0/detekt that referenced this pull request Feb 11, 2024
…etekt#6548)

toUpperCase and toLowerCase are deprecated, the ImplicitDefaultLocale should not check usage for them anymore

Closes detekt#6343
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pick request Marker for PRs that should be ported to the 1.0 release branch rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ImplicitDefaultLocale rule should not check for deprecated functions
6 participants