-
Notifications
You must be signed in to change notification settings - Fork 53
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
Clean up CodeQL issues #275
Clean up CodeQL issues #275
Conversation
…ob to run nightly, to basically change into a nightly build
} | ||
|
||
// now, "salt" the strings | ||
for (int i = 0; i < 32; i++) | ||
{ | ||
var c = Convert.ToChar(48 + MyRnd.Next(10)); | ||
decimals += c; | ||
hexamals += c; | ||
decimals += c; |
Check notice
Code scanning / CodeQL
String concatenation in loop Note
decimals += c; | ||
hexamals += c; | ||
decimals += c; | ||
hexamals += c; |
Check notice
Code scanning / CodeQL
String concatenation in loop Note
@@ -606,20 +623,18 @@ | |||
{ | |||
if (tpli == 'D' && decimals.Length > 0) | |||
{ | |||
id += decimals[0]; | |||
decimals = decimals.Remove(0, 1); | |||
id += decimals[ 0 ]; |
Check notice
Code scanning / CodeQL
String concatenation in loop Note
{ | ||
id += hexamals[0]; | ||
hexamals = hexamals.Remove(0, 1); | ||
id += hexamals[ 0 ]; |
Check notice
Code scanning / CodeQL
String concatenation in loop Note
{ | ||
id += alphamals[0]; | ||
alphamals = alphamals.Remove(0, 1); | ||
id += alphamals[ 0 ]; |
Check notice
Code scanning / CodeQL
String concatenation in loop Note
@@ -339,6 +343,19 @@ | |||
this.foundText == other.foundText && | |||
this.foundHash == other.foundHash; | |||
} | |||
|
|||
public override bool Equals(object obj) => obj is SearchResultItem item && Equals(item); |
Check warning
Code scanning / CodeQL
Equals should not apply "is" Warning
Description
This PR addresses several CodeQL issues identified across various files in the project. The changes include removing unused variables, fixing potentially dangerous logic, and ensuring proper implementation of methods like Equals(object).
Motivation and Context
These changes are necessary to improve code quality and maintainability by resolving CodeQL alerts related to unused variables, dangerous logic patterns, and missing method implementations.
Type of change
How Has This Been Tested?
The changes have been tested by running unit tests and verifying the affected functionality in a development environment. Detailed tests were conducted to ensure that the fixes are effective and do not introduce regressions.
Screenshots (if appropriate):
Checklist: