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 useless variable assignments #1400

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

imnasnainaec
Copy link
Contributor

@imnasnainaec imnasnainaec commented Feb 25, 2025

Fixes roughly half of the 80+ "Useless assignment to local variable" code warnings: https://github.com/sillsdev/libpalaso/security/code-scanning?query=is%3Aopen+branch%3Amaster+rule%3Acs%2Fuseless-assignment-to-local


This change is Reviewable

Copy link

Palaso Tests

     4 files  ±    0       4 suites  ±0   15m 45s ⏱️ - 2m 30s
 4 902 tests ±    0   4 674 ✅ ±    0  228 💤 ±  0  0 ❌ ±0 
11 883 runs   - 4 074  11 421 ✅  - 3 852  462 💤  - 222  0 ❌ ±0 

Results for commit 2e5a795. ± Comparison against base commit 3813e6c.

@@ -47,7 +47,7 @@
using (TempFile working = new TempFile(_originalLift))
{
int howManyEntries = 10000;
Debug.WriteLine("running test using "+howManyEntries.ToString()+" entries");
Debug.WriteLine("running test using " + howManyEntries.ToString() + " entries");

Check notice

Code scanning / CodeQL

Redundant ToString() call Note test

Redundant call to 'ToString' on a String object.
Comment on lines +72 to +76
if (keymanLink.Initialize())
{
if (keymanLink.Keyboards != null && keymanLink.Keyboards.Length > 0)
return true;
}

Check notice

Code scanning / CodeQL

Nested 'if' statements can be combined Note

These 'if' statements can be combined.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant