refactors qodana profile and enables checks#4517
Merged
Merged
Conversation
Updates the qodana analysis workflow file name.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request refactors several components to improve code maintainability while enhancing Qodana configuration and updating dependency versions. Key changes include:
- Refactoring the version variable serializer to use a static FromJson method and removing the WorkingDirectory property from the converter context.
- Updating namespace usage in tests and helper classes to better reflect usage contexts.
- Enhancing the Qodana configuration by renaming inspections and updating file exclusions, and updating the GitHub Action version.
Reviewed Changes
Copilot reviewed 20 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/GitVersion.Output/Serializer/VersionVariableSerializer.cs | Changed FromJson to a static method to improve usability. |
| src/GitVersion.Output/OutputGenerator/OutputContext.cs | Removed the WorkingDirectory parameter for a simplified context. |
| src/GitVersion.Output/GitVersionOutputTool.cs | Updated OutputContext instantiation to match the refactored record. |
| src/GitVersion.Output.Tests/Output/FormatArgumentTests.cs | Changed IEnvironment usage to concrete TestEnvironment for consistency. |
| src/GitVersion.Core/PublicAPI.Shipped.txt | Updated public API to reflect the interface changes. |
| src/GitVersion.Core/OutputVariables/IVersionVariableSerializer.cs | Removed FromJson from the interface in line with the new static implementation. |
| src/GitVersion.Core/Output/IConverterContext.cs | Simplified the interface by removing the WorkingDirectory property. |
| src/GitVersion.Core/Configuration/IIgnoreConfiguration.cs | Removed default implementation for IsEmpty for explicit implementation. |
| Other test and helper files | Updated namespace references and dependency injection to use TestEnvironment. |
| qodana.yaml | Renamed and reorganized inspection rules and exclusions for clarity. |
| .github/workflows/qodana_analysis.yml | Updated Qodana GitHub Action to version v2025.1.0. |
Files not reviewed (2)
- build/CI.slnx: Language not supported
- src/GitVersion.App.Tests/GitVersion.App.Tests.csproj: Language not supported
Contributor
|
Thank you @arturcic for your contribution! |
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.
This pull request includes updates to dependencies, refactors for improved code maintainability, enhancements to Qodana configuration, and namespace adjustments to improve project organization.
Dependency Updates:
v2025.1.0in.github/workflows/qodana_analysis.yml.Refactoring and Code Simplification:
WorkingDirectoryproperty from theIConverterContextinterface and its implementations, simplifying theOutputContextrecord structure [1] [2] [3].VersionVariableSerializerto makeFromJsona static method, improving usability and clarity.IIgnoreConfiguration.IsEmpty[1] [2].Qodana Configuration Enhancements:
.github/workflows/qodana_code_quality.ymlto.github/workflows/qodana_analysis.ymland updated references inbuild/CI.slnx.qodana.yaml, including renaming and reorganizing inspection names for better clarity and adding specific file exclusions for certain inspections [1] [2] [3].Namespace Adjustments:
ExecutableHelperfromGitVersion.Core.Tests.HelperstoGitVersion.App.Tests.Helpersto align with its usage context and updated references accordingly [1] [2] [3] [4].Minor Test and Code Improvements:
IEnvironmentwithTestEnvironmentin various test files for consistency and better test isolation [1] [2] [3].