Skip to content

Atualização de pacote nuget#32

Merged
jldsilva merged 1 commit into
mainfrom
development
Jul 27, 2025
Merged

Atualização de pacote nuget#32
jldsilva merged 1 commit into
mainfrom
development

Conversation

@jldsilva
Copy link
Copy Markdown
Owner

@jldsilva jldsilva commented Jul 27, 2025

  • SonarAnalyzer atualizado.
  • Reestruturação dos arquivos csproj referente aos testes unitários, onde os pacotes relacionados ao framework de testes foram reorganizados.

Description by Callstackai

This PR updates the SonarAnalyzer package and restructures the csproj files related to unit tests, reorganizing the test framework packages.

Diagrams of code changes
sequenceDiagram
    participant Tests
    participant API
    participant Application
    participant Domain
    participant Infrastructure
    participant ExternalServices
    participant JobScheduler

    Tests->>API: References InvoiceReminder.API
    Tests->>Application: References InvoiceReminder.Application
    Tests->>Domain: References InvoiceReminder.Domain
    Tests->>Infrastructure: References InvoiceReminder.Authentication & Data
    Tests->>ExternalServices: References InvoiceReminder.ExternalServices
    Tests->>JobScheduler: References InvoiceReminder.JobScheduler
    
    Note over Tests: Added Test Dependencies:<br/>- NSubstitute<br/>- Shouldly<br/>- MSTest<br/>- NetArchTest
    Note over API: Added SonarAnalyzer<br/>Disabled Nullable
Loading
Files Changed
FileSummary
InvoiceReminder.API.UnitTests/InvoiceReminder.API.UnitTests.csprojAdded project references for API and unit test assets.
InvoiceReminder.API/InvoiceReminder.API.csprojUpdated SonarAnalyzer package version.
InvoiceReminder.Application.UnitTests/InvoiceReminder.Application.UnitTests.csprojAdded project references for application and unit test assets.
InvoiceReminder.ArchitectureTests/InvoiceReminder.ArchitectureTests.csprojChanged Nullable setting from enable to disable.
InvoiceReminder.DomainEntities.UnitTests/InvoiceReminder.DomainEntities.UnitTests.csprojAdded project references for domain and unit test assets.
InvoiceReminder.ExternalServices.UnitTests/InvoiceReminder.ExternalServices.UnitTests.csprojAdded project reference for external services.
InvoiceReminder.Infrastructure.UnitTests/InvoiceReminder.Infrastructure.UnitTests.csprojAdded project references for authentication, data, and unit test assets.
InvoiceReminder.JobScheduler.UnitTests/InvoiceReminder.JobScheduler.UnitTests.csprojAdded project reference for job scheduler and reorganized package references.

This PR includes files in programming languages that we currently do not support. We have not reviewed files with the extensions .csproj. See list of supported languages.

Summary by CodeRabbit

  • Chores
    • Reorganização dos arquivos de projeto para consolidar e reordenar referências de pacotes e projetos.
    • Atualização da versão do pacote SonarAnalyzer.CSharp.
    • Alteração da configuração de tipos anuláveis em um dos projetos de testes.
    • Nenhuma alteração funcional ou de dependências foi realizada; mudanças são apenas estruturais e de organização interna dos arquivos de projeto.

- SonarAnalyzer atualizado.
- Reestruturação dos arquivos csproj referente aos testes unitários, onde os pacotes relacionados ao framework de testes foram reorganizados.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jul 27, 2025

Walkthrough

Os arquivos de projeto (.csproj) de vários módulos da solução InvoiceReminder foram reorganizados para consolidar e reordenar referências de pacotes e projetos. Não houve alteração nas versões dos pacotes, nem mudanças em propriedades ou entidades públicas exportadas. As modificações focam exclusivamente na organização estrutural dos arquivos.

Changes

Cohort Change Summary
InvoiceReminder.API.UnitTests.csproj
InvoiceReminder.Application.UnitTests.csproj
InvoiceReminder.ExternalServices.UnitTests.csproj
InvoiceReminder.Infrastructure.UnitTests.csproj
Reorganização dos <ProjectReference> para o início do arquivo, logo após <PropertyGroup>. Consolidação de múltiplos <ItemGroup> de <PackageReference Update=...> em um único <ItemGroup>. Sem alteração de versões.
InvoiceReminder.JobScheduler.UnitTests.csproj
InvoiceReminder.DomainEntities.UnitTests.csproj
Consolidação e reordenação de <PackageReference> e <ProjectReference>. Agrupamento de referências em menos <ItemGroup>. Nenhuma alteração de versão.
InvoiceReminder.API.csproj Atualização da versão do pacote SonarAnalyzer.CSharp (de 10.14.0.120626 para 10.15.0.120848) e reorganização do <Nullable> após <ImplicitUsings>.
InvoiceReminder.ArchitectureTests.csproj Desabilitação do Nullable (<Nullable>disable</Nullable>), reorganização e consolidação de <PackageReference>, alteração do modo de inclusão do Microsoft.NET.Test.Sdk. Nenhuma alteração de versão.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutos

Possibly related PRs

  • Development #30: Atualiza a versão do MSTest SDK no mesmo arquivo de projeto reorganizado neste PR, ambos modificam o InvoiceReminder.API.UnitTests.csproj, sendo relacionados ao nível de estrutura do arquivo.

Poem

🐇✨
No jardim dos projetos, saltitei,
Referências e pacotes, organizei.
Nada mudou no código, só clareza ganhei,
ItemGroups agrupados, bagunça não deixei.
Com arquivos limpos e ordem no lugar,
O coelhinho feliz vai compilar!

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch development

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
InvoiceReminder.Infrastructure.UnitTests/InvoiceReminder.Infrastructure.UnitTests.csproj (1)

15-19: Consolidação de referências de projetos melhora a organização, mas avalie limitar a exposição
Ótima movimentação das <ProjectReference> para o início do arquivo; facilita manutenção e leitura.
Considere adicionar <PrivateAssets>all</PrivateAssets> ou <ReferenceOutputAssembly>false</ReferenceOutputAssembly> se esses assemblies não precisarem ser expostos a consumidores externos — prática comum em projetos de teste para evitar dependências transitivas desnecessárias.

InvoiceReminder.JobScheduler.UnitTests/InvoiceReminder.JobScheduler.UnitTests.csproj (1)

20-26: Pacotes de mocking e assertions agrupados corretamente
Boa prática colocar NSubstitute e Shouldly juntos; apenas verifique se o <PrivateAssets> em NSubstitute.Analyzers.CSharp é realmente necessário para todos os cenários de build, caso contrário pode ser removido para agilizar restaurações.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 30a0b1a and 474be43.

📒 Files selected for processing (8)
  • InvoiceReminder.API.UnitTests/InvoiceReminder.API.UnitTests.csproj (1 hunks)
  • InvoiceReminder.API/InvoiceReminder.API.csproj (2 hunks)
  • InvoiceReminder.Application.UnitTests/InvoiceReminder.Application.UnitTests.csproj (1 hunks)
  • InvoiceReminder.ArchitectureTests/InvoiceReminder.ArchitectureTests.csproj (2 hunks)
  • InvoiceReminder.DomainEntities.UnitTests/InvoiceReminder.DomainEntities.UnitTests.csproj (1 hunks)
  • InvoiceReminder.ExternalServices.UnitTests/InvoiceReminder.ExternalServices.UnitTests.csproj (1 hunks)
  • InvoiceReminder.Infrastructure.UnitTests/InvoiceReminder.Infrastructure.UnitTests.csproj (1 hunks)
  • InvoiceReminder.JobScheduler.UnitTests/InvoiceReminder.JobScheduler.UnitTests.csproj (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Analyze (csharp)
  • GitHub Check: Analyze (csharp)
🔇 Additional comments (10)
InvoiceReminder.API/InvoiceReminder.API.csproj (1)

21-24: Atualização do SonarAnalyzer requer checagem de compatibilidade

A alteração da versão do pacote SonarAnalyzer.CSharp para 10.15.0.120848 pode introduzir novas regras ou alterar severidades das existentes. Garanta que o build do SonarCloud/SonarQube continue passando e que nenhum falso-positivo crítico seja introduzido nos pipelines.

InvoiceReminder.ExternalServices.UnitTests/InvoiceReminder.ExternalServices.UnitTests.csproj (1)

16-18: Reorganização dos ProjectReference melhora legibilidade

Mover a referência do projeto de produção para logo após o bloco de propriedades facilita a leitura e segue o padrão adotado no restante da solução. Sem objeções.

InvoiceReminder.Application.UnitTests/InvoiceReminder.Application.UnitTests.csproj (1)

15-18: Consolidação de ItemGroup reduz ruído

A unificação dos ProjectReference em um único bloco elimina duplicação e deixa o .csproj mais enxuto. Ótima melhoria.

InvoiceReminder.API.UnitTests/InvoiceReminder.API.UnitTests.csproj (1)

15-19: Posicionamento dos ProjectReference alinhado ao padrão da solução

Colocar as referências logo no início padroniza todos os projetos de teste. Alteração bem-vinda.

InvoiceReminder.DomainEntities.UnitTests/InvoiceReminder.DomainEntities.UnitTests.csproj (1)

21-24: Agrupamento de pacotes facilita manutenção

Centralizar Microsoft.Extensions.Configuration.UserSecrets, NSubstitute e Shouldly no mesmo ItemGroup simplifica futuras atualizações. Tudo certo.

InvoiceReminder.ArchitectureTests/InvoiceReminder.ArchitectureTests.csproj (3)

7-7: Desabilitar Nullable pode reduzir a segurança em tempo de compilação
Ao mudar <Nullable> para disable, perdemos avisos de referência nula e possíveis NREs passam despercebidos. Se não houver forte motivo, prefira enable ou annotations.

-    <Nullable>disable</Nullable>
+    <Nullable>enable</Nullable>

23-24: Inclusão direta das dependências de teste está correta
Adicionar NetArchTest.Rules e Shouldly nesse grupo centraliza dependências e simplifica o diff futuro. Nada a ajustar.


28-37: Uso de <PackageReference Update=…> garante versão unificada
A estratégia de Update é adequada para alinhar versões em todos os projects. Certifique-se apenas de que nenhum outro ItemGroup traga versões divergentes para os mesmos pacotes.

InvoiceReminder.JobScheduler.UnitTests/InvoiceReminder.JobScheduler.UnitTests.csproj (2)

16-16: Projeto principal referenciado no topo — 👍
Mover a <ProjectReference> para o primeiro grupo melhora a visibilidade.


29-30: Alinhamento das versões de ferramentas de teste
Versões do Microsoft.NET.Test.Sdk e CodeCoverage atualizadas via Update mantêm consistência — verifique se o pipeline CI possui a mesma versão para evitar advertências.

@jldsilva jldsilva merged commit 1a6f33c into main Jul 27, 2025
8 checks passed
@jldsilva jldsilva deleted the development branch July 27, 2025 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant