Qodana #10
8848 new problems found by Qodana for .NET
Qodana for .NET
8848 new problems were found
Inspection name | Severity | Problems |
---|---|---|
XAML resource of invalid type |
🔴 Failure | 94 |
Unexpected text token error |
🔴 Failure | 25 |
Namespace does not correspond to file location |
🔶 Warning | 295 |
Type member is never used (private accessibility) |
🔶 Warning | 191 |
Possible 'System.NullReferenceException' |
🔶 Warning | 142 |
Redundant member initializer |
🔶 Warning | 105 |
Auto-property accessor is never used (non-private accessibility) |
🔶 Warning | 91 |
Possible 'null' assignment to non-nullable entity |
🔶 Warning | 78 |
Constructor not resolved |
🔶 Warning | 73 |
Static resource not resolved |
🔶 Warning | 71 |
Redundant argument with default value |
🔶 Warning | 58 |
Unused parameter (private accessibility) |
🔶 Warning | 46 |
Redundant using directive |
🔶 Warning | 37 |
Redundant namespace alias |
🔶 Warning | 34 |
Redundant class or interface specification in base types list |
🔶 Warning | 33 |
Missing grid column/row setter for non-first child |
🔶 Warning | 33 |
Conditional access qualifier expression is known to be null or not null |
🔶 Warning | 32 |
Redundant cast |
🔶 Warning | 32 |
Invalid XML documentation comment |
🔶 Warning | 26 |
Parameter hides member |
🔶 Warning | 26 |
Assignment is not used |
🔶 Warning | 24 |
Redundant explicit type in array creation |
🔶 Warning | 23 |
Redundant catch clause |
🔶 Warning | 22 |
Virtual member call in constructor |
🔶 Warning | 22 |
Unused local variable |
🔶 Warning | 21 |
Redundant control flow jump statement |
🔶 Warning | 20 |
Underlying type of enum is 'int' |
🔶 Warning | 19 |
Empty general catch clause |
🔶 Warning | 15 |
Explicit argument passed to parameter with caller info attribute |
🔶 Warning | 15 |
Expression is always 'true' or always 'false' |
🔶 Warning | 13 |
Local variable hides member |
🔶 Warning | 13 |
Redundant name qualifier |
🔶 Warning | 13 |
Redundant type declaration body |
🔶 Warning | 12 |
Grid element column/row index is out of grid definition range |
🔶 Warning | 12 |
Path error |
🔶 Warning | 12 |
Return value of [MustUseReturnValue] annotated method is not used |
🔶 Warning | 10 |
Cannot resolve symbol in text argument |
🔶 Warning | 10 |
Redundant explicit size specification in array creation |
🔶 Warning | 10 |
Possible multiple enumeration |
🔶 Warning | 9 |
Redundant 'base.' qualifier |
🔶 Warning | 9 |
Redundant base constructor call |
🔶 Warning | 8 |
Auto-property accessor is never used (private accessibility) |
🔶 Warning | 8 |
Remove redundant attached property setter |
🔶 Warning | 8 |
Collection content is never queried (non-private accessibility) |
🔶 Warning | 7 |
Member hides static member from outer class |
🔶 Warning | 7 |
Non-accessed local variable |
🔶 Warning | 7 |
Possible 'System.InvalidOperationException' |
🔶 Warning | 7 |
Explicit delegate creation expression is redundant |
🔶 Warning | 7 |
Access to modified captured variable |
🔶 Warning | 6 |
'??' condition is known to be null or not null |
🔶 Warning | 6 |
Redundant lambda expression parameter type specification |
🔶 Warning | 6 |
Unused nullable directive |
🔶 Warning | 6 |
Access to a static member of a type via a derived type |
🔶 Warning | 5 |
Possible overflow in unchecked context |
🔶 Warning | 5 |
Mismatch of optional parameter value in overridden method |
🔶 Warning | 5 |
Possible loss of fraction |
🔶 Warning | 5 |
Unsafe context declaration is redundant |
🔶 Warning | 5 |
String.IndexOf is culture-specific (string.IndexOf(string, int) is culture-specific) |
🔶 Warning | 5 |
Assignment made to same variable |
🔶 Warning | 4 |
Member initialized value ignored |
🔶 Warning | 4 |
Redundant empty switch section |
🔶 Warning | 4 |
Use of obsolete symbol |
🔶 Warning | 3 |
Dictionary lookup can be simplified with 'TryGetValue' |
🔶 Warning | 3 |
Conditional access qualifier expression is not null according to nullable reference types' annotations |
🔶 Warning | 3 |
Empty statement is redundant |
🔶 Warning | 3 |
Possible unassigned object created by 'new' expression |
🔶 Warning | 3 |
Redundant 'partial' modifier on type declaration |
🔶 Warning | 3 |
Redundant 'string.Format()' call |
🔶 Warning | 3 |
Unassigned field |
🔶 Warning | 3 |
Assignment in conditional expression |
🔶 Warning | 2 |
Async function without await expression |
🔶 Warning | 2 |
Co-variant array conversion |
🔶 Warning | 2 |
Expression is always 'true' or 'false' according to nullable reference types' annotations |
🔶 Warning | 2 |
Heuristically unreachable code |
🔶 Warning | 2 |
Method with optional or 'params' parameter is hidden by overload |
🔶 Warning | 2 |
Operator 'is'/'Type Of ... Is ...' can be used |
🔶 Warning | 2 |
Private field can be converted into local variable |
🔶 Warning | 2 |
Redundant 'IEnumerable.Cast<T>' or 'IEnumerable.OfType<T>' call |
🔶 Warning | 2 |
Variable in local function hides variable from outer scope |
🔶 Warning | 2 |
x:FieldModifier attribute requires x:Name attribute |
🔶 Warning | 2 |
Redundant resource |
🔶 Warning | 2 |
Property value is equal to style-provided |
🔶 Warning | 2 |
Access to disposed captured variable |
🔶 Warning | 1 |
Code is unreachable |
🔶 Warning | 1 |
Possible null reference argument for a parameter. |
🔶 Warning | 1 |
Collection content is never queried (private accessibility) |
🔶 Warning | 1 |
Empty constructor |
🔶 Warning | 1 |
Function never returns |
🔶 Warning | 1 |
Non-accessed field |
🔶 Warning | 1 |
Non-accessed field (private accessibility) |
🔶 Warning | 1 |
Redundant 'Attribute' suffix |
🔶 Warning | 1 |
Redundant boolean comparison |
🔶 Warning | 1 |
Redundant 'case' label |
🔶 Warning | 1 |
Redundant empty finally block |
🔶 Warning | 1 |
Redundant nullable directive |
🔶 Warning | 1 |
Redundant type arguments of method |
🔶 Warning | 1 |
Return value of pure method is not used |
🔶 Warning | 1 |
Constant shift expression with non-zero operands results in a zero value |
🔶 Warning | 1 |
Shift expression with zero left operand equals zero |
🔶 Warning | 1 |
String.Compare is culture-specific (string.Compare(string, string, bool) is culture-specific) |
🔶 Warning | 1 |
String.LastIndexOf is culture-specific (string.LastIndexOf(string) is culture-specific) |
🔶 Warning | 1 |
Method return value is never used (private accessibility) |
🔶 Warning | 1 |
Type is never used (private accessibility) |
🔶 Warning | 1 |
Unused type parameter |
🔶 Warning | 1 |
Binding mode is equal to default |
🔶 Warning | 1 |
Use preferred 'var' style (for built-in types) |
◽️ Notice | 1476 |
Type member is never used (non-private accessibility) |
◽️ Notice | 1111 |
Use preferred 'var' style (when type is simple) |
◽️ Notice | 739 |
Add/remove 'this.' qualifier |
◽️ Notice | 428 |
Member can be made private (non-private accessibility) |
◽️ Notice | 392 |
Invert 'if' statement to reduce nesting |
◽️ Notice | 187 |
Redundant empty argument list on object creation expression |
◽️ Notice | 181 |
Use preferred style of 'new' expression when created type is evident |
◽️ Notice | 172 |
Use preferred 'var' style (elsewhere) |
◽️ Notice | 157 |
Remove redundant parentheses |
◽️ Notice | 154 |
Member can be made static (shared) (private accessibility) |
◽️ Notice | 125 |
Field can be made readonly (private accessibility) |
◽️ Notice | 103 |
Property can be made init-only (non-private accessibility) |
◽️ Notice | 77 |
Non-accessed field (non-private accessibility) |
◽️ Notice | 73 |
Parameter can be declared with the base type |
◽️ Notice | 72 |
Convert into 'using' declaration |
◽️ Notice | 67 |
Local variable has too wide declaration scope |
◽️ Notice | 65 |
Use explicit or implicit modifier definition for type members |
◽️ Notice | 61 |
Auto-property can be made get-only (private accessibility) |
◽️ Notice | 57 |
Field can be made readonly (non-private accessibility) |
◽️ Notice | 50 |
Type is never used (non-private accessibility) |
◽️ Notice | 46 |
Redundant string interpolation |
◽️ Notice | 44 |
Class is never instantiated (non-private accessibility) |
◽️ Notice | 43 |
Replace 'Slice' with range indexer |
◽️ Notice | 41 |
'if-return' statement can be rewritten as 'return' statement |
◽️ Notice | 39 |
Use object or collection initializer when possible |
◽️ Notice | 35 |
Join local variable declaration and assignment |
◽️ Notice | 34 |
Use preferred style for trailing comma before new line in multiline lists |
◽️ Notice | 32 |
Convert into 'await using' statement or declaration |
◽️ Notice | 30 |
Some values of the enum are not processed inside 'switch' statement and are handled via default section |
◽️ Notice | 28 |
Use string interpolation expression |
◽️ Notice | 28 |
Literal length can be reduced by using verbatim string |
◽️ Notice | 28 |
Inline 'out' variable declaration |
◽️ Notice | 27 |
Some values of the enum are not processed inside 'switch' statement |
◽️ Notice | 26 |
Auto-property can be made get-only (non-private accessibility) |
◽️ Notice | 25 |
Use 'nameof' expression to reference name |
◽️ Notice | 24 |
Use explicit or implicit modifier definition for types |
◽️ Notice | 22 |
Merge null/pattern/value checks into 'or'/'and' patterns |
◽️ Notice | 21 |
Type member is never accessed via base type (non-private accessibility) |
◽️ Notice | 21 |
Redundant 'else' keyword |
◽️ Notice | 20 |
Unused parameter (non-private accessibility) |
◽️ Notice | 20 |
Method has async overload |
◽️ Notice | 18 |
Virtual (overridable) member is never overridden (non-private accessibility) |
◽️ Notice | 18 |
Convert 'if' statement into 'switch' |
◽️ Notice | 17 |
Use index from end expression |
◽️ Notice | 16 |
Replace built-in type reference with a CLR type name or a keyword |
◽️ Notice | 15 |
For-loop can be converted into foreach-loop |
◽️ Notice | 15 |
Member can be made static (shared) (non-private accessibility) |
◽️ Notice | 15 |
Member can be made protected (non-private accessibility) |
◽️ Notice | 14 |
Use UTF-8 string literal |
◽️ Notice | 14 |
Adjust modifiers declaration order |
◽️ Notice | 13 |
Convert constructor into primary constructor |
◽️ Notice | 13 |
Merge conditional ?: expression into conditional access |
◽️ Notice | 13 |
Convert local variable or field into constant (private accessibility) |
◽️ Notice | 12 |
Unresolved binding path when DataContext is unknown |
◽️ Notice | 12 |
Use preferred style of default value expression when type is not evident |
◽️ Notice | 11 |
'if' statement can be rewritten as '?:' expression |
◽️ Notice | 11 |
Merge null/pattern checks into complex pattern |
◽️ Notice | 11 |
Method supports cancellation |
◽️ Notice | 11 |
Redundant lambda signature parentheses |
◽️ Notice | 10 |
Replace with single call to FirstOrDefault(..) |
◽️ Notice | 10 |
Method return value is never used (non-private accessibility) |
◽️ Notice | 10 |
Foreach loop can be converted into LINQ-expression but another 'GetEnumerator' method will be used |
◽️ Notice | 9 |
Pass string interpolation expression |
◽️ Notice | 9 |
Replace 'switch' statement with 'switch' expression |
◽️ Notice | 8 |
Event is never subscribed to (non-private accessibility) |
◽️ Notice | 8 |
Loop can be converted into LINQ-expression |
◽️ Notice | 8 |
Array creation can be replaced with array initializer |
◽️ Notice | 7 |
Simplify conditional ternary expression |
◽️ Notice | 7 |
Replace if statement with null-propagating code |
◽️ Notice | 7 |
Convert constructor into member initializers |
◽️ Notice | 6 |
Convert static method invocation into extension method call |
◽️ Notice | 6 |
Add/remove qualifier for static members |
◽️ Notice | 5 |
Use compound assignment |
◽️ Notice | 5 |
Method has async overload with cancellation support |
◽️ Notice | 5 |
Parameter type can be IEnumerable<T> (private accessibility) |
◽️ Notice | 5 |
Redundant semicolon after type or namespace declaration |
◽️ Notice | 5 |
Replace 'Substring' with range indexer |
◽️ Notice | 5 |
'if' statement can be rewritten as '??=' assignment |
◽️ Notice | 4 |
Parentheses are redundant if attribute has no arguments |
◽️ Notice | 4 |
Unassigned field (non-private accessibility) |
◽️ Notice | 4 |
Use preferred style of 'new' expression when created type is not evident |
◽️ Notice | 3 |
Class with virtual (overridable) members never inherited (non-private accessibility) |
◽️ Notice | 3 |
'if' statement can be rewritten as '??' expression |
◽️ Notice | 3 |
Part of foreach loop can be converted into LINQ-expression but another 'GetEnumerator' method will be used |
◽️ Notice | 3 |
Some values of the enum are not processed inside 'switch' expression and are handled via exception in default arm |
◽️ Notice | 3 |
Use raw string |
◽️ Notice | 3 |
Convert property into auto-property |
◽️ Notice | 2 |
Convert property into auto-property (when possible) |
◽️ Notice | 2 |
Inline temporary variable |
◽️ Notice | 2 |
Replace with single call to First(..) |
◽️ Notice | 2 |
Type parameter could be declared as covariant or contravariant |
◽️ Notice | 2 |
Use preferred style for trailing comma when the last element is not followed by a new line |
◽️ Notice | 1 |
Convert into lambda expression |
◽️ Notice | 1 |
Convert delegate variable into local function |
◽️ Notice | 1 |
Double negation operator |
◽️ Notice | 1 |
Introduce optional parameters (non-private accessibility) |
◽️ Notice | 1 |
Merge negated null/pattern checks into complex pattern |
◽️ Notice | 1 |
Merge sequential checks into single conditional access check |
◽️ Notice | 1 |
Make constructor in abstract class protected |
◽️ Notice | 1 |
Use 'String.IsNullOrEmpty' |
◽️ Notice | 1 |
Return type can be IEnumerable<T> (non-private accessibility) |
◽️ Notice | 1 |
Return type can be IEnumerable<T> (private accessibility) |
◽️ Notice | 1 |
Simplify LINQ expression (use 'All') |
◽️ Notice | 1 |
Specify string comparison explicitly |
◽️ Notice | 1 |
Struct can be made readonly |
◽️ Notice | 1 |
Use 'Array.Empty<T>()' |
◽️ Notice | 1 |
Use collection's count property |
◽️ Notice | 1 |
Convert 'as' expression type check and the following null check into pattern matching |
◽️ Notice | 1 |
Use unsigned right shift operator '>>>' |
◽️ Notice | 1 |
Use 'with' expression to copy struct |
◽️ Notice | 1 |
💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report
Contact Qodana team
Contact us at [email protected]
- Or via our issue tracker: https://jb.gg/qodana-issue
- Or share your feedback: https://jb.gg/qodana-discussions
Details
This result was published with Qodana GitHub Action
Annotations
Check warning on line 664 in CollapseLauncher/Classes/Interfaces/Class/ProgressBase.cs
github-actions / Qodana for .NET
Access to disposed captured variable
Captured variable is disposed in the outer scope
Check warning on line 470 in CollapseLauncher/Classes/RegionManagement/RegionManagement.cs
github-actions / Qodana for .NET
Access to modified captured variable
Captured variable is modified in the outer scope
Check warning on line 150 in CollapseLauncher/XAMLs/MainApp/Pages/Dialogs/SimpleDialogs.cs
github-actions / Qodana for .NET
Access to modified captured variable
Captured variable is modified in the outer scope
Check warning on line 151 in CollapseLauncher/XAMLs/MainApp/Pages/Dialogs/SimpleDialogs.cs
github-actions / Qodana for .NET
Access to modified captured variable
Captured variable is modified in the outer scope
Check warning on line 152 in CollapseLauncher/XAMLs/MainApp/Pages/Dialogs/SimpleDialogs.cs
github-actions / Qodana for .NET
Access to modified captured variable
Captured variable is modified in the outer scope
Check warning on line 157 in CollapseLauncher/XAMLs/MainApp/Pages/Dialogs/SimpleDialogs.cs
github-actions / Qodana for .NET
Access to modified captured variable
Captured variable is modified in the outer scope
Check warning on line 466 in CollapseLauncher/Classes/RegionManagement/RegionManagement.cs
github-actions / Qodana for .NET
Access to modified captured variable
Captured variable is modified in the outer scope
Check warning on line 177 in CollapseLauncher/XAMLs/MainApp/TrayIcon.xaml.cs
github-actions / Qodana for .NET
Access to a static member of a type via a derived type
Access to a static member of a type via a derived type
Check warning on line 201 in CollapseLauncher/XAMLs/Updater/Classes/Updater.cs
github-actions / Qodana for .NET
Access to a static member of a type via a derived type
Access to a static member of a type via a derived type
Check warning on line 91 in CollapseLauncher/XAMLs/Updater/UpdaterWindow.xaml.cs
github-actions / Qodana for .NET
Access to a static member of a type via a derived type
Access to a static member of a type via a derived type
Check warning on line 98 in CollapseLauncher/XAMLs/MainApp/Pages/SettingsPage.xaml.cs
github-actions / Qodana for .NET
Access to a static member of a type via a derived type
Access to a static member of a type via a derived type
Check warning on line 179 in CollapseLauncher/XAMLs/MainApp/Pages/SettingsPage.xaml.cs
github-actions / Qodana for .NET
Access to a static member of a type via a derived type
Access to a static member of a type via a derived type
github-actions / Qodana for .NET
Use preferred style of default value expression when type is not evident
Redundant type specification
Check notice on line 193 in Hi3Helper.Core/Classes/Data/Tools/IniFile.cs
github-actions / Qodana for .NET
Use preferred style of default value expression when type is not evident
Redundant type specification
Check notice on line 165 in Hi3Helper.Core/Classes/Data/Tools/IniFile.cs
github-actions / Qodana for .NET
Use preferred style of default value expression when type is not evident
Redundant type specification
Check notice on line 255 in Hi3Helper.Core/Classes/Data/Tools/IniFile.cs
github-actions / Qodana for .NET
Use preferred style of default value expression when type is not evident
Redundant type specification
github-actions / Qodana for .NET
Use preferred style of default value expression when type is not evident
Redundant type specification
Check notice on line 231 in Hi3Helper.Core/Classes/Data/Tools/IniFile.cs
github-actions / Qodana for .NET
Use preferred style of default value expression when type is not evident
Redundant type specification
Check notice on line 207 in Hi3Helper.Core/Classes/Data/Tools/IniFile.cs
github-actions / Qodana for .NET
Use preferred style of default value expression when type is not evident
Redundant type specification
github-actions / Qodana for .NET
Use preferred style of default value expression when type is not evident
Redundant type specification
Check notice on line 129 in Hi3Helper.Core/Classes/Data/Tools/IniFile.cs
github-actions / Qodana for .NET
Use preferred style of default value expression when type is not evident
Redundant type specification
Check notice on line 143 in Hi3Helper.Core/Classes/Data/Tools/IniFile.cs
github-actions / Qodana for .NET
Use preferred style of default value expression when type is not evident
Redundant type specification
Check notice on line 151 in Hi3Helper.Core/Classes/Data/Tools/IniFile.cs
github-actions / Qodana for .NET
Use preferred style of default value expression when type is not evident
Redundant type specification
Check notice on line 183 in Hi3Helper.Core/Classes/Data/InvokeProp.cs
github-actions / Qodana for .NET
Adjust modifiers declaration order
Inconsistent modifiers declaration order
Check notice on line 6 in Hi3Helper.EncTool/Hashes/HexTool.cs
github-actions / Qodana for .NET
Adjust modifiers declaration order
Inconsistent modifiers declaration order