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

Enforce brackets #817

Merged
merged 3 commits into from
Apr 27, 2024

Use .Select to shut codeql

791ee20
Select commit
Loading
Failed to load commit list.
Merged

Enforce brackets #817

Use .Select to shut codeql
791ee20
Select commit
Loading
Failed to load commit list.
GitHub Advanced Security / CodeQL succeeded Apr 24, 2024 in 6s

8 new alerts

New alerts in code changed by this pull request

  • 8 notes

See annotations below for details.

View all branch alerts.

Annotations

Check notice on line 90 in framework/OpenMod.Core/Helpers/TimeSpanHelper.cs

See this annotation in the file changed.

Code scanning / CodeQL

Missed opportunity to use Select Note

This foreach loop immediately
maps its iteration variable to another variable
- consider mapping the sequence explicitly using '.Select(...)'.

Check notice on line 99 in unturned/OpenMod.Unturned.Module.Shared/System.Drawing/ColorConverter.cs

See this annotation in the file changed.

Code scanning / CodeQL

Generic catch clause Note

Generic catch clause.

Check notice on line 134 in unturned/OpenMod.Unturned.Module.Shared/System.Drawing/ColorConverter.cs

See this annotation in the file changed.

Code scanning / CodeQL

Generic catch clause Note

Generic catch clause.

Check notice on line 175 in unturned/OpenMod.Unturned.Module.Shared/System.Drawing/ColorTranslator.cs

See this annotation in the file changed.

Code scanning / CodeQL

Missed ternary opportunity Note

Both branches of this 'if' statement return - consider using '?' to express intent better.

Check notice on line 449 in unturned/OpenMod.Unturned.Module.Shared/System.Drawing/KnownColors.cs

See this annotation in the file changed.

Code scanning / CodeQL

Missed ternary opportunity Note

Both branches of this 'if' statement write to the same variable - consider using '?' to express intent better.

Check notice on line 46 in unturned/OpenMod.Unturned.Module.Shared/System.Drawing/ColorConverter.cs

See this annotation in the file changed.

Code scanning / CodeQL

Missed 'readonly' opportunity Note

Field 'creatingCached' can be 'readonly'.

Check notice on line 43 in unturned/OpenMod.Unturned.Module.Shared/System.Drawing/KnownColors.cs

See this annotation in the file changed.

Code scanning / CodeQL

Missed 'readonly' opportunity Note

Field 'ArgbValues' can be 'readonly'.

Check notice on line 50 in unturned/OpenMod.Unturned/Effects/UnturnedUIEffectKey.cs

See this annotation in the file changed.

Code scanning / CodeQL

Useless call to GetHashCode() Note

Calling GetHashCode() on type short is redundant.

Check notice on line 42 in framework/OpenMod.Core/Localization/SmartFormatOptions.cs

See this annotation in the file changed.

Code scanning / CodeQL

Generic catch clause Note

Generic catch clause.

Check notice on line 61 in framework/OpenMod.Core/Localization/SmartFormatOptions.cs

See this annotation in the file changed.

Code scanning / CodeQL

Generic catch clause Note

Generic catch clause.