-
Notifications
You must be signed in to change notification settings - Fork 94
Feat: Adicionando funcionalidades no projeto #65
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds comprehensive infrastructure and testing capabilities to a .NET 9 investment management API project following Clean Architecture principles. The changes include Docker support for containerized deployment, code coverage tooling, and a complete implementation of domain entities, repositories, use cases, and API controllers.
Key Changes:
- Docker containerization setup with SQL Server database
- Test coverage reporting with PowerShell script and Coverlet configuration
- Complete implementation of Clean Architecture layers (Domain, Application, Infrastructure, API)
Reviewed changes
Copilot reviewed 86 out of 87 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/docker-compose.yml | Docker Compose configuration for API and SQL Server services |
| src/docker-compose.override.yml | Development environment overrides for Docker Compose |
| src/run_coverage.ps1 | PowerShell script to run tests with coverage and generate HTML reports |
| src/coverlet.runsettings | Test coverage configuration excluding migrations, DTOs, and generated code |
| src/README.md | Comprehensive project documentation with setup and usage instructions |
| src/ProjInv.Domain/* | Domain entities (Investidor, Investimento, Retirada) with business logic |
| src/ProjInv.Infrastructure/* | Repository implementations and EF Core database context |
| src/ProjInv.Application/* | Use case handlers with validation using MediatR and FluentValidation |
| src/ProjInv.API/* | API controllers, configuration, and Dockerfile |
| src/ProjInv.Tests/* | Unit tests for domain, infrastructure, and application layers |
| src/appsettings.json | Application configuration with database connection string |
| src/.dockerignore | Docker ignore file excluding build artifacts and unnecessary files |
Files not reviewed (1)
- src/ProjInv.Infrastructure/Migrations/20251130001751_ImplementacaoInvestimentosCorreta.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| container_name: sqlserver | ||
| environment: | ||
| - ACCEPT_EULA=Y | ||
| - SA_PASSWORD=YourStrong@Passw0rd |
Copilot
AI
Dec 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded SQL Server SA password is exposed. The password "YourStrong@Passw0rd" should not be stored in plain text. Use Docker secrets or environment variables from a secure source instead.
| @@ -0,0 +1,12 @@ | |||
| { | |||
| "ConnectionStrings": { | |||
| "DefaultConnection": "Server=localhost;Database=ProjInvestimento;User Id=sa;Password=YourStrong@Passw0rd;MultipleActiveResultSets=True;TrustServerCertificate=True" | |||
Copilot
AI
Dec 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded database credentials in the connection string. The password "YourStrong@Passw0rd" should not be committed to the repository. Use user secrets or environment-specific configuration files that are excluded from source control.
| "DefaultConnection": "Server=localhost;Database=ProjInvestimento;User Id=sa;Password=YourStrong@Passw0rd;MultipleActiveResultSets=True;TrustServerCertificate=True" | |
| "DefaultConnection": "Server=localhost;Database=ProjInvestimento;User Id=sa;Password=__DB_PASSWORD__;MultipleActiveResultSets=True;TrustServerCertificate=True" |
| using ProjInv.Application.UseCases.Investidor.Commands; | ||
| using ProjInv.Domain.Interfaces; | ||
| using Serilog; | ||
| using static System.Runtime.InteropServices.JavaScript.JSType; |
Copilot
AI
Dec 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import statement. The import using static System.Runtime.InteropServices.JavaScript.JSType; is not used in this file and should be removed.
| using static System.Runtime.InteropServices.JavaScript.JSType; |
| var investidor = await _uow.Investidores.GetByIdAsync(request.Id, cancellationToken); | ||
| if (investidor == null) | ||
| { | ||
| _logger.Error("Investidor n�o encontrado para Remo��o."); |
Copilot
AI
Dec 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect character encoding in error message. The text contains "�" characters that should be proper Portuguese characters. The message should be "Investidor não encontrado para Remoção." with proper UTF-8 encoding.
| environment: | ||
| - ASPNETCORE_ENVIRONMENT=Development | ||
| - ASPNETCORE_URLS=http://+:8080 | ||
| - ConnectionStrings__DefaultConnection=Server=sqlserver;Database=ProjInvestimento;User Id=sa;Password=YourStrong@Passw0rd;TrustServerCertificate=true; |
Copilot
AI
Dec 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded database credentials are exposed in the connection string. The password "YourStrong@Passw0rd" should not be stored in plain text in the repository. Consider using environment variables or secrets management for sensitive credentials.
No description provided.