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

refactor: replace multiple == checks with in #186

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

deepsource-autofix[bot]
Copy link
Contributor

To check if a variable is equal to one of many values, combine the values into a tuple and check if the variable is contained in it instead of checking for equality against each of the values.
This is faster, less verbose, and more readable.

To check if a variable is equal to one of many values, combine the values into a tuple and check if the variable is contained `in` it instead of checking for equality against each of the values.
This is faster, less verbose, and more readable.
Copy link
Contributor

deepsource-io bot commented Oct 18, 2024

Here's the code health analysis summary for commits 6c791bf..a418968. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Terraform LogoTerraform✅ SuccessView Check ↗
DeepSource Swift LogoSwift✅ SuccessView Check ↗
DeepSource Test coverage LogoTest coverage✅ Success
🚨 1 failing metric
View Check ↗
DeepSource SQL LogoSQL✅ SuccessView Check ↗
DeepSource Shell LogoShell✅ SuccessView Check ↗
DeepSource Secrets LogoSecrets✅ SuccessView Check ↗
DeepSource Scala LogoScala✅ SuccessView Check ↗
DeepSource Rust LogoRust✅ SuccessView Check ↗
DeepSource Ruby LogoRuby✅ SuccessView Check ↗
DeepSource Python LogoPython✅ Success
🎯 3 occurences resolved
View Check ↗
DeepSource PHP LogoPHP✅ SuccessView Check ↗
DeepSource Kotlin LogoKotlin✅ SuccessView Check ↗
DeepSource Java LogoJava✅ SuccessView Check ↗
DeepSource Docker LogoDocker✅ SuccessView Check ↗
DeepSource C & C++ LogoC & C++✅ SuccessView Check ↗
DeepSource C# LogoC#✅ SuccessView Check ↗
DeepSource Ansible LogoAnsible✅ SuccessView Check ↗
DeepSource Go LogoGo✅ SuccessView Check ↗
DeepSource JavaScript LogoJavaScript✅ SuccessView Check ↗

Code Coverage Report

MetricAggregateJava
Branch Coverage42.9%42.9%
Condition Coverage21.4%21.4%
Composite Coverage24.7%, ✅ Above Threshold24.7%
Line Coverage25.3%, ❌ Below Threshold25.3%, ✅ Above Threshold

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants