tea2d.io

View on GitHub

Roslyn report

Overview of Report

This report contains details of C# code state. Automated code analysis tools like Roslyn were used to evaluate level of issues.

Repository Details

General information

Maintainability index: (high quality codebase index is equal or higher to 5) -

Source Code Size: XS (x <= 1000) - Codebase size is good

Programming languages statistics:

File Size Details

Total files found: 61 - CSharp and CSHTML files

Biggest file size: 204 (LoC) - File size is acceptable but should be moved to smaller numbers

Average file size: 34 (LoC) - File size is good

Top 10 biggest files for primary development language (C#, cshtml)

File Name

Size

Lines of Code

File Page

FastList.cs

M

204

src/Tea2D/Core/Collections/FastList.cs

ValueString.cs

M

199

src/Tea2D/Core/Memory/ValueString.cs

ComponentsFilter_Templates.cs

M

193

src/Tea2D/Ecs/ComponentFilters/ComponentsFilter_Templates.cs

ValueStringTests.cs

M

132

test/Tea2D.Tests/Core/Memory/ValueStringTests.cs

LoggerTests.cs

M

117

test/Tea2D.Tests/Core/Diagnostics/Logging/LoggerTests.cs

Game.cs

S

96

examples/SimpleGame/Game.cs

ComponentsTuple.cs

S

80

src/Tea2D/Ecs/ComponentFilters/ComponentsTuple.cs

ComponentsFilter.cs

S

75

src/Tea2D/Ecs/ComponentFilters/ComponentsFilter.cs

ObjectPoolTests.cs

S

59

test/Tea2D.Tests/Core/Memory/Pools/ObjectPoolTests.cs

ObjectPool.cs

S

46

src/Tea2D/Core/Memory/Pools/ObjectPool.cs

C# Code Issues

Distribution issues by category:

Top 10 of most frequent issues

These are the issues which most frequently appear in your source code. Issues with low and medium severity does not cause potential quality issues but may cause inconvenies during

Issue ID

Severity

Title

Description

Count

S113

Info

Files should contain an empty newline at the end

Add a new line at the end of the file 'DrawableComponent.cs'.

60

S121

Info

Control structures should use curly braces

Add curly braces around the nested statement(s) in this 'foreach' block.

37

S4069

Warning

Operator overloads should have named alternatives

Implement alternative method 'Subtract' for the operator '-'.

17

S3874

Warning

"out" and "ref" parameters should not be used

Consider refactoring this method in order to remove the need for this 'ref' modifier.

17

S1104

Warning

Fields should not have public accessibility

Make this field 'private' and encapsulate it in a 'public' property.

17

S4018

Warning

Generic methods should provide type parameters

Refactor this method to have parameters matching all the type parameters.

13

S3898

Warning

Value types should implement "IEquatable<T>"

Implement 'IEquatable<T>' in value type 'DrawableComponent'.

13

S109

Warning

Magic numbers should not be used

Assign this magic number '15' to a well-named (variable|constant), and use the (variable|constant) instead.

12

S3900

Warning

Arguments of public methods should be validated against null

Refactor this method to add validation of parameter 'window' before using it.

9

S3717

Warning

Track use of "NotImplementedException"

Implement this method or throw 'NotSupportedException' instead.

5

Top 10 of most severe issues

Table below contains list of issues which are considered to be potential defects and require attention:

Issue ID

Severity

Title

Description

Count

S1104

Warning

Fields should not have public accessibility

17

S3874

Warning

"out" and "ref" parameters should not be used

17

S4069

Warning

Operator overloads should have named alternatives

17

S3898

Warning

Value types should implement "IEquatable<T>"

13

S4018

Warning

Generic methods should provide type parameters

13

S109

Warning

Magic numbers should not be used

12

S3900

Warning

Arguments of public methods should be validated against null

9

S3717

Warning

Track use of "NotImplementedException"

5

S1135

Warning

Track uses of "TODO" tags

4

S2328

Warning

"GetHashCode" should not reference mutable fields

4

In many cases issues specified in the table above require fixes. Please plan technical activities to reduce amount of these issues.