-
Notifications
You must be signed in to change notification settings - Fork 0
Handle all but one sonar issue #195
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
📝 WalkthroughWalkthroughThese changes include: a logger type adjustment in CommonProducer from interface to implementation, error message formatting normalization in KafkaConsumerBase, topic creation logic optimization to filter non-existing topics before iteration, and a constructor parameter change in RequestFilterProcessor requiring non-null dependency injection. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–25 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
|
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/Altinn.Notifications.Sms.Integrations/Consumers/KafkaConsumerBase.cs(1 hunks)src/Altinn.Notifications.Sms.Integrations/Producers/CommonProducer.cs(3 hunks)src/Altinn.Notifications.Sms/Telemetry/RequestFilterProcessor.cs(1 hunks)
🔇 Additional comments (4)
src/Altinn.Notifications.Sms/Telemetry/RequestFilterProcessor.cs (1)
18-21: LGTM! Non-null constructor parameter enforces proper DI contract.The change correctly requires
IHttpContextAccessorat construction time rather than accepting null. The existing null-conditional onHttpContextinOnStart(line 31) remains appropriate sinceHttpContextitself can be null even when the accessor is not.src/Altinn.Notifications.Sms.Integrations/Producers/CommonProducer.cs (2)
19-24: LGTM! Logger type correctly uses concrete class.Using
ILogger<CommonProducer>instead ofILogger<ICommonProducer>is the correct pattern for structured logging, as the logger category should reflect the concrete implementation.
57-57: LGTM! Consistent placeholder naming.Capitalizing
{Message}and{Status}aligns with structured logging conventions.src/Altinn.Notifications.Sms.Integrations/Consumers/KafkaConsumerBase.cs (1)
39-39: LGTM! Proper structured logging format.Removing spaces from placeholder names (
{Class},{Reason}) ensures correct structured logging behavior and fixes the Sonar issue.



Description
Related Issue(s)
Verification
Documentation
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.