Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
*.Designer.cs
*.Designer.cs
*.csproj.user
/.vs/RESTClient .Net/v14/.suo/
/NuGet/Exported/
bin/
obj/
packages/
.sonarqube/
/.vs/restore.dg
/RESTClientDotNet.Net/.vs
/CF.RESTClientDotNet.Net/.vs/*.dg
Expand Down
46 changes: 46 additions & 0 deletions CSDT_PrimeraEntrega2024.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# An�lisis de Calidad del C�digo y Recomendaciones

## Resultados de SonarQube

- **Code Smells**: 49
- **Complejidad Ciclom�tica**: 307
- **Complejidad Cognitiva**: 119
- **Deuda T�cnica diagnosticada**: 3h 34min
- **Duplicaciones**: 0%
- **Cobertura de pruebas**: 0%
- **Ratio de deuda**: 0.5% A
- Se sugiere dividir 2 clases para mejorar la legibilidad del c�digo.
- En promedio, el 11% del c�digo son comentarios.
- Hay una cantidad significativa de TODOs sin resolver.
- Problemas detectados en el c�digo:
- **Bloqueantes**: 1
- **Cr�ticos**: 2
- **Mayores**: 39
- **Menores**: 4
- **Informativos**: 3

## Resultados de Visual Studio

- **Advertencias**: 115
- **Errores**: 16
- El limpiador y formateador autom�tico de c�digo modific� 3 archivos.

## Resultados de Pruebas Manuales

- La instalaci�n del proyecto presenta gran complejidad.
- Vulnerabilidad de alto riesgo en Newtonsoft.Json.
- Discrepancias en las versiones de librer�as instaladas.
- Compatibilidad solo con versiones descontinuadas de .NET Core (2.0 y 4.5).
- Falta de compatibilidad con versiones de .NET Core superiores a la 7.
- Falta de buenas pr�cticas.
- Insuficiente documentaci�n y comentarios en el c�digo.
- Pruebas unitarias existentes no son detectadas.
- Desorganizaci�n en el proyecto de pruebas.

## Recomendaciones

- **Refactorizaci�n**: Priorizar la resoluci�n de los problemas bloqueantes y cr�ticos. Considerar dividir las clases sugeridas para mejorar la legibilidad.
- **Documentaci�n**: Aumentar la cantidad de comentarios en el c�digo, especialmente en partes complejas y para TODOs importantes.
- **Pruebas**: Mejorar la cobertura de pruebas automatizadas. Reorganizar y optimizar el proyecto de pruebas para asegurar su efectividad.
- **Dependencias**: Actualizar o reemplazar la librer�a Newtonsoft.Json por una versi�n sin vulnerabilidades conocidas. Unificar versiones de librer�as para evitar conflictos.
- **Compatibilidad**: Asegurar la compatibilidad del proyecto con versiones recientes de .NET Core para garantizar seguridad y soporte a largo plazo.
5 changes: 3 additions & 2 deletions src/ApiExamples.Model/ApiExamples.Model.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.22.1" />
<PackageReference Include="Google.Protobuf" Version="3.26.0" />
<PackageReference Include="Grpc" Version="2.46.6" />
<PackageReference Include="Grpc.Tools" Version="2.53.0">
<PackageReference Include="Grpc.Tools" Version="2.62.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/ApiExamples/ApiExamples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.IO.Pipelines" Version="4.7.2" />
</ItemGroup>

Expand Down
1 change: 1 addition & 0 deletions src/RestClient.NET/RestClient.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<ProjectReference Include="..\RestClient.Net.Abstractions\RestClient.Net.Abstractions.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Urls" Version="1.0.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<ProjectReference Include="..\RestClient.Net.Abstractions\RestClient.Net.Abstractions.csproj" />
<ProjectReference Include="..\RestClient.Net\RestClient.Net.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using RestClientApiSamples;
using RestClient.Net;
using RestClient.Net;
using RestClientApiSamples;
using System;
using System.Threading.Tasks;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
<Compile Include="..\..\RestClient.Net.Samples.Uno\RestClient.Net.Samples.Uno.Shared\NewtonsoftSerializationAdapter.cs" Link="SerializationAdapters\NewtonsoftSerializationAdapter.cs" />
<Compile Include="..\RestClient.Net.Samples\SerializationAdapters\ProtobufSerializationAdapter.cs" Link="SerializationAdapters\ProtobufSerializationAdapter.cs" />
<Compile Include="..\RESTClient.NET.Samples\SerializationAdapters\XmlSerializationAdapter.cs" Link="SerializationAdapters\XmlSerializationAdapter.cs" />
<PackageReference Include="Google.Protobuf" Version="3.22.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Google.Protobuf" Version="3.26.0" />
<ProjectReference Include="..\..\ApiExamples.Model\ApiExamples.Model.csproj" />
<ProjectReference Include="..\..\RESTClient.NET\RestClient.Net.csproj" />
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/RestClient.Net.UnitTests/NullCheckTests.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using Urls;

#if !NET45
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Polly.Extensions.Http" Version="3.0.0" />
<PackageReference Include="RichardSzalay.MockHttp" Version="6.0.0" />
<PackageReference Include="structuremap" Version="4.7.1" />
Expand Down
2 changes: 2 additions & 0 deletions src/RestClient.Net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{162022A2-9D7B-4E32-9FE9-A179829C1337}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
..\.gitignore = ..\.gitignore
..\.github\workflows\buildandtest.yml = ..\.github\workflows\buildandtest.yml
..\CSDT_PrimeraEntrega2024.md = ..\CSDT_PrimeraEntrega2024.md
Directory.Build.props = Directory.Build.props
..\README.md = ..\README.md
EndProjectSection
Expand Down
6 changes: 3 additions & 3 deletions src/RestClient.Net/DefaultHttpClientFactory.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using System;
using System.Collections.Concurrent;
using System.Net.Http;
using System.Threading;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;

namespace RestClient.Net
{
Expand Down