feat: enable static analysis#44
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enables .NET built-in static analysis support while addressing various errors and refactoring code for improved consistency and maintainability. Key changes include updating API endpoint access modifiers and DTO naming conventions, replacing direct logger calls with unified Log methods, and integrating new code analysis configurations.
Reviewed Changes
Copilot reviewed 85 out of 85 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Stickerlandia.UserManagement.Api/Program.cs | Updated endpoint response types and logging configurations. |
| Stickerlandia.UserManagement.Api/Middlewares/GlobalExceptionHandler.cs | Refactored error handling and logging to use shared Log methods. |
| Stickerlandia.UserManagement.Api/LoginEndpoint.cs | Added null and input validations; modified access level to internal. |
| Stickerlandia.UserManagement.Api/GetUserDetailsEndpoint.cs | Changed DTO type naming and access modifier adjustments. |
| Stickerlandia.UserManagement.Api/Configurations/RemoveSwaggerDefinitionsFilter.cs | Removed duplicate schema removal calls for Swagger definitions. |
| Stickerlandia.UserManagement.Agnostic/UserManagementDbContext.cs | Adjusted OnModelCreating for consistency and ensured null checks. |
| Stickerlandia.UserManagement.Agnostic/PostgresUserRepository.cs | Introduced additional argument validations and improved logging. |
| Stickerlandia.UserManagement.Agnostic/MicrsoftIdentityAuthService.cs | Applied null-coalescing for email and fixed potential null issues. |
| Stickerlandia.UserManagement.Agnostic/KafkaEventPublisher.cs | Converted producer methods to async with improved error handling. |
| Stickerlandia.UserManagement.Agnostic/KafakStickerClaimedWorker.cs | Updated dependency names and logging; see naming comment below. |
| Various build and configuration files | Added static analysis configurations and updated project settings. |
Comments suppressed due to low confidence (2)
user-management/src/Stickerlandia.UserManagement.Api/Program.cs:100
- The DTO type was renamed from UserAccountDTO to UserAccountDto here; please ensure that this naming change is applied consistently across the codebase.
.Produces<ApiResponse<UserAccountDto>>(200)
user-management/src/Stickerlandia.UserManagement.Agnostic/KafakStickerClaimedWorker.cs:1
- The file and class name 'KafakStickerClaimedWorker' appears to contain a typo; consider renaming it to 'KafkaStickerClaimedWorker' for clarity and consistency.
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
…tions/RemoveSwaggerDefinitionsFilter.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
jeastham1993
added a commit
that referenced
this pull request
Jun 19, 2025
* feat: correct sticker-award to handle errors according to API spec * feat: add AWS implementation and IaC * Update user-management/infra/aws/lib/network.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * feat: update connection string * chore: add labels to docker image * chore: remove ASPNET Lambda hosting * chore: add todos for future shared infra * feat: enable static analysis (#44) * feat: implement fixes from static analysis * feat: add static analysis configuration * feat: add static analysis configuration * fix: remove duplicate .sln file * Update user-management/src/Stickerlandia.UserManagement.Api/Configurations/RemoveSwaggerDefinitionsFilter.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Merge pull request #45 from DataDog/feat/add-datadog-to-docker feat: add Datadog tracer to Dockerfiles * feat(user-management): update docs (#37) * chore: update OpenAPI docs * chore: update README * chore: add license and notice files * chore: add dockerignore file * Update user-management/src/Stickerlandia.UserManagement.Api/Configurations/RemoveSwaggerDefinitionsFilter.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update user-management/src/Stickerlandia.UserManagement.Api/Configurations/AuthorizeOperationFilter.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update user-management/README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * chore: expand local dev and code structure docs * chore: add cloud provider specific SLN files * fix: specify .sln in dotnet restore * chore: docs updates --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * feat: add AWS implementation and IaC * feat: update connection string * Update user-management/infra/aws/lib/network.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * chore: add labels to docker image * chore: remove ASPNET Lambda hosting * chore: add todos for future shared infra * chore: fix static analysis for AWS impls * feat: add arch diagram and README for AWS infra --------- Co-authored-by: Scott Gerring <scott@scottgerring.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Scott Gerring <scottgerring@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable .NET built in static analysis support and fix errors.