Skip to content

Updates project dependencies and coding style configurations#82

Merged
jldsilva merged 3 commits into
developmentfrom
Packages-Update
Mar 15, 2026
Merged

Updates project dependencies and coding style configurations#82
jldsilva merged 3 commits into
developmentfrom
Packages-Update

Conversation

@jldsilva

@jldsilva jldsilva commented Mar 15, 2026

Copy link
Copy Markdown
Owner

Updates .NET SDK to 10.0.201 and bumps several NuGet packages, including Microsoft.AspNetCore, Npgsql, and Testcontainers.

Adds EditorConfig rules to enforce Async naming suffixes and ensure namespaces match the folder structure. Refines the database migration history configuration by using named arguments for improved clarity.

Summary by CodeRabbit

Notas de Lançamento

  • Chores

    • Atualizadas dependências .NET e múltiplos pacotes NuGet para versões mais recentes.
    • SDK .NET atualizado.
  • Style

    • Novas regras de convenção (EditorConfig) para nomes e namespaces, incluindo padronização do sufixo Async.
  • Improvements

    • Fluxos de envio de mensagens e operações de persistência migrados para APIs assíncronas, melhorando consistência e responsividade.
  • Tests

    • Testes atualizados para validar as novas APIs assíncronas.

Updates .NET SDK to 10.0.201 and bumps several NuGet packages, including Microsoft.AspNetCore, Npgsql, and Testcontainers.

Adds EditorConfig rules to enforce `Async` naming suffixes and ensure namespaces match the folder structure. Refines the database migration history configuration by using named arguments for improved clarity.
@jldsilva jldsilva self-assigned this Mar 15, 2026
@jldsilva jldsilva added .NET Pull requests that update .NET code dependencies Pull requests that update a dependency file labels Mar 15, 2026
@coderabbitai

coderabbitai Bot commented Mar 15, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ad06b25f-8ae8-44ce-8774-f3433a28f7d2

📥 Commits

Reviewing files that changed from the base of the PR and between 20d1f62 and c610357.

📒 Files selected for processing (1)
  • InvoiceReminder.JobScheduler/JobSettings/CronJob.cs

Walkthrough

Atualiza regras de estilo no .editorconfig, eleva versões de pacotes NuGet e do SDK .NET, e renomeia métodos para sufixo Async (interface, implementação, chamadas e testes); também ajusta argumentos nomeados em uma chamada de migração.

Changes

Cohort / File(s) Summary
Configurações de estilo
/.editorconfig
Adiciona regra para namespaces seguirem pastas e convenção que métodos assíncronos terminem com sufixo Async (PascalCase) com severidade warning.
Gerenciamento central de pacotes
Directory.Packages.props
Bump de várias dependências (Microsoft.* para 10.0.5, Dapper, Npgsql, Npgsql.EntityFrameworkCore.PostgreSQL, Quartz, Scalar.AspNetCore, SonarAnalyzer.CSharp, Telegram.Bot, Testcontainers, etc.).
SDK global
/global.json
Atualiza SDK .NET de 10.0.102 para 10.0.201.
Injeção e EF Migrations
InvoiceReminder.CrossCutting.IoC/DependencyInjectionConfig.cs
Substitui argumentos posicionais por nomeados em chamada MigrationsHistoryTable(tableName: ..., schema: ...).
API / Endpoint
InvoiceReminder.API/Endpoints/SendMessageEndpoints.cs
Altera chamada para usar SendMessageAsync (await do método assíncrono).
Serviço externo (interface + implementação)
InvoiceReminder.ExternalServices/SendMessage/ISendMessageService.cs, InvoiceReminder.ExternalServices/SendMessage/SendMessageService.cs
Renomeia método público de SendMessageSendMessageAsync (assinatura preservada) e atualiza referências internas/logging.
UnitOfWork / Conexão DB
InvoiceReminder.Data/Repository/UnitOfWork.cs
Troca métodos internos OpenConnection/CloseConnection por OpenConnectionAsync/CloseConnectionAsync e usa OpenAsync/CloseAsync no fluxo de SaveChangesAsync.
Agendador de Jobs
InvoiceReminder.JobScheduler/JobSettings/CronJob.cs
Altera chamada para SendMessageAsync e passa context.CancellationToken.
Testes atualizados
InvoiceReminder.UnitTests.API/.../SendMessageEndpointsTests.cs, InvoiceReminder.UnitTests.ExternalServices/.../SendMessageServiceTests.cs, InvoiceReminder.UnitTests.JobScheduler/.../CronJobTests.cs
Atualiza stubs, retornos e verificações para usar SendMessageAsync (preserva asserções e fluxo dos testes).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

enhancement

Poem

🐇
Pulei entre pacotes e Async no ar,
Sufixo alinhado, nomes a brilhar,
SDK renovado pra tudo compilar,
Conexões cuidadas, testes a cantar,
Um pulo, uma release — vamos rodar! 🥕✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive O título é amplo e cobre apenas parcialmente as mudanças principais. Menciona dependências e configurações de estilo, mas omite a mudança central de renomear métodos para o padrão Async. Considere um título mais específico que destaque a mudança principal: renomeação de métodos para padrão Async (ex: 'Rename SendMessage to SendMessageAsync following naming conventions').
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch Packages-Update
📝 Coding Plan
  • Generate coding plan for human review comments

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Directory.Packages.props (1)

29-51: ⚠️ Potential issue | 🟡 Minor

Atualizações de pacotes do sistema: verificar breaking changes de Telegram.Bot v22.x.

As atualizações de Dapper (2.1.72), Npgsql (10.0.2), Quartz (3.16.1), Scalar.AspNetCore (2.13.8) e SonarAnalyzer (10.21.0.135717) são bumps de patch e não introduzem breaking changes em si. No entanto, Telegram.Bot 22.9.5.3 está na série v22.x, que contém breaking changes significativas em relação a v21.x e anteriores:

  • Remoção de métodos com sufixo *Async (ex: SendTextMessageAsyncSendMessage)
  • Alterações de tipo: intlong para campos como TopicId, StarCount, Amount
  • Mudança de Poll.Type de string para enum PollType
  • Remoção de IUpdateReceiver e DefaultUpdateReceiver

Verifique se o código está pronto para essas mudanças ou confirme que a atualização é de v22.x para v22.x (sem quebras adicionais).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Directory.Packages.props` around lines 29 - 51, This bump introduces
Telegram.Bot v22.x which has breaking changes: search for usages of Telegram.Bot
(package name), calls to obsolete methods like SendTextMessageAsync and replace
with SendMessage (and other removed *Async suffixes), update numeric fields
TopicId/StarCount/Amount from int to long where used, change usages of Poll.Type
from string to the enum PollType, and remove/replace implementations of
IUpdateReceiver/DefaultUpdateReceiver with the new update handling API; verify
all call-sites, DTOs, and tests and either adapt the code to the new symbols or
pin Telegram.Bot to the previous v21.x series if you cannot migrate now.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.editorconfig:
- Around line 208-216: The naming rule
dotnet_naming_rule.async_methods_end_in_async is causing warnings because
existing async methods (SendMessageService.SendMessage, CronJob.Execute,
UnitOfWork.OpenConnection, UnitOfWork.CloseConnection) do not end with the Async
suffix; either rename those methods to SendMessageAsync, ExecuteAsync,
OpenConnectionAsync and CloseConnectionAsync (and update all call sites) to
comply, or relax the rule temporarily by changing
dotnet_naming_rule.async_methods_end_in_async.severity to suggestion to allow a
gradual migration.
- Line 215: The naming rule property
dotnet_naming_style.end_in_async.required_sufix is misspelled; rename the
property key from required_sufix to required_suffix under the
dotnet_naming_style.end_in_async entry and update any other occurrences of the
incorrect key so the async suffix rule is applied correctly.

---

Outside diff comments:
In `@Directory.Packages.props`:
- Around line 29-51: This bump introduces Telegram.Bot v22.x which has breaking
changes: search for usages of Telegram.Bot (package name), calls to obsolete
methods like SendTextMessageAsync and replace with SendMessage (and other
removed *Async suffixes), update numeric fields TopicId/StarCount/Amount from
int to long where used, change usages of Poll.Type from string to the enum
PollType, and remove/replace implementations of
IUpdateReceiver/DefaultUpdateReceiver with the new update handling API; verify
all call-sites, DTOs, and tests and either adapt the code to the new symbols or
pin Telegram.Bot to the previous v21.x series if you cannot migrate now.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bad75e38-3d14-4223-a34c-d95417f9ad70

📥 Commits

Reviewing files that changed from the base of the PR and between 64e976c and 33b9856.

📒 Files selected for processing (4)
  • .editorconfig
  • Directory.Packages.props
  • InvoiceReminder.CrossCutting.IoC/DependencyInjectionConfig.cs
  • global.json

Comment thread .editorconfig
Comment thread .editorconfig Outdated
Fixes a typo in the EditorConfig naming rule and renames asynchronous methods across the API, services, and repository layers to consistently include the Async suffix.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
InvoiceReminder.JobScheduler/JobSettings/CronJob.cs (1)

34-34: Considere propagar o CancellationToken para SendMessageAsync.

O método SendMessageAsync aceita um CancellationToken opcional que não está sendo passado. O contexto do Quartz fornece um token de cancelamento via context.CancellationToken que deveria ser propagado para permitir o cancelamento gracioso da operação.

♻️ Correção proposta
-        _ = await service.SendMessageAsync(id);
+        _ = await service.SendMessageAsync(id, context.CancellationToken);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@InvoiceReminder.JobScheduler/JobSettings/CronJob.cs` at line 34, A chamada em
CronJob.cs usa _ = await service.SendMessageAsync(id); sem propagar o
CancellationToken; altere a chamada para passar context.CancellationToken (ou o
token apropriado disponível no método que implementa IJob.Execute/ExecuteAsync)
— ou seja, trocar SendMessageAsync(id) por SendMessageAsync(id,
context.CancellationToken) para permitir cancelamento gracioso da operação no
método SendMessageAsync.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@InvoiceReminder.JobScheduler/JobSettings/CronJob.cs`:
- Line 34: A chamada em CronJob.cs usa _ = await service.SendMessageAsync(id);
sem propagar o CancellationToken; altere a chamada para passar
context.CancellationToken (ou o token apropriado disponível no método que
implementa IJob.Execute/ExecuteAsync) — ou seja, trocar SendMessageAsync(id) por
SendMessageAsync(id, context.CancellationToken) para permitir cancelamento
gracioso da operação no método SendMessageAsync.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1651484d-0b5d-4f69-aaa0-fecc3daeeb94

📥 Commits

Reviewing files that changed from the base of the PR and between 33b9856 and 20d1f62.

📒 Files selected for processing (9)
  • .editorconfig
  • InvoiceReminder.API/Endpoints/SendMessageEndpoints.cs
  • InvoiceReminder.Data/Repository/UnitOfWork.cs
  • InvoiceReminder.ExternalServices/SendMessage/ISendMessageService.cs
  • InvoiceReminder.ExternalServices/SendMessage/SendMessageService.cs
  • InvoiceReminder.JobScheduler/JobSettings/CronJob.cs
  • InvoiceReminder.UnitTests.API/Endpoints/SendMessageEndpointsTests.cs
  • InvoiceReminder.UnitTests.ExternalServices/SendMessage/SendMessageServiceTests.cs
  • InvoiceReminder.UnitTests.JobScheduler/JobSettings/CronJobTests.cs
🚧 Files skipped from review as they are similar to previous changes (1)
  • .editorconfig

Ensures the `SendMessageAsync` call in the background job respects the cancellation token from the job context for improved lifecycle management and graceful shutdowns. Removes an obsolete developer comment.
@jldsilva jldsilva merged commit 507b920 into development Mar 15, 2026
5 checks passed
@jldsilva jldsilva deleted the Packages-Update branch March 16, 2026 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant