-
Notifications
You must be signed in to change notification settings - Fork 652
Introduce Qodana analysis #4514
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
Conversation
cb14fc3
to
1d855e4
Compare
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.
Pull Request Overview
This PR introduces Qodana analysis and various code quality improvements, alongside refactoring tests and the ArgumentParser to enhance clarity and maintainability. Key updates include:
- Adjustments to editorconfig and analyzer rules, and the addition of ReSharper-specific configurations.
- Integration of a new Qodana CI/CD workflow and configuration file.
- Refactoring of test files and improvements in ArgumentParser logic.
Reviewed Changes
Copilot reviewed 234 out of 236 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/GitVersion.BuildAgents/Agents/EnvRun.cs | Changed environment variable constant to private and streamlined condition checks. |
src/GitVersion.BuildAgents/Agents/Drone.cs | Reversed conditional logic for branch detection and standardized environment variable retrieval. |
src/GitVersion.BuildAgents/Agents/BitBucketPipelines.cs | Simplified string output and inline conditional logic for branch identification. |
src/GitVersion.BuildAgents/Agents/AzurePipelines.cs | Streamlined conditionals using ternary operators for branch/tag handling and build number updates. |
src/GitVersion.BuildAgents/Agents/AppVeyor.cs | Optimized branch retrieval using a ternary operator with environment variables. |
src/GitVersion.App/QuotedStringHelpers.cs | Adopted new C# raw array literal syntax for filtering split strings. |
src/GitVersion.App/OverrideConfigurationOptionParser.cs | Minor type declaration changes for improved consistency. |
src/GitVersion.App/FileSystemGlobbing/DirectoryInfoGlobbingWrapper.cs | Refactored file system enumeration and exception messaging. |
src/GitVersion.App/ArgumentParser.cs | Simplified target path parsing and switch handling logic. |
src/GitVersion.App.Tests/* | Various test refactorings including string literal updates and type adjustments. |
qodana.yaml | New Qodana configuration file defining inspection profiles and rules. |
.github/workflows/qodana_code_quality.yml | New GitHub workflow for running Qodana analysis on specified branches. |
Files not reviewed (2)
- .editorconfig: Language not supported
- build/CI.slnx: Language not supported
Adds a Qodana workflow to analyze code quality. Configures the workflow with .NET SDK setup, Qodana scan execution, and inspection profiles.
Integrates a baseline file for Qodana in the GitHub Actions workflow to compare analysis results against a predefined state. This helps to minimize noise by filtering out preexisting issues.
1d855e4
to
0ec9f61
Compare
Thank you @arturcic for your contribution! |
🎉 This issue has been resolved in version 6.3.0 🎉 Your GitReleaseManager bot 📦🚀 |
This pull request includes significant updates to
.editorconfig
rules, introduces a new Qodana code quality workflow and configuration, and refactors various test files and theArgumentParser
class to improve code clarity and maintainability. Below is a summary of the most important changes:Code Style and Analyzer Rule Updates:
.editorconfig
to adjust severity levels for various C# style rules, such as changingcsharp_style_var_*
rules fromsilent
tosuggestion
. Removed several IDE and CA diagnostic rules, such asIDE0011
(add braces) andCA1825
(avoid zero-length array allocations). [1] [2]resharper_csharp_use_roslyn_logic_for_evident_types
andresharper_csharp_instance_members_qualify_members
. [1] [2]Qodana Code Quality Workflow:
.github/workflows/qodana_code_quality.yml
to integrate JetBrains Qodana into CI/CD pipelines. This includes branch-specific triggers and steps for setup and scanning.qodana.yaml
configuration file to define inspection profiles and rules for Qodana analysis, enabling and excluding specific inspections.build/CI.slnx
to include theqodana.yaml
file and the new Qodana workflow. [1] [2]Test Refactoring:
ArgumentParserTests.cs
,ExecCmdLineArgumentTest.cs
, andVersionWriterTests.cs
. [1] [2] [3]Run
inProgramFixture.cs
to remove unnecessary array conversion.ArgumentParser Improvements:
ArgumentParser.cs
by reducing unnecessary nesting and improving readability, such as combining single-lineif
statements and removing redundant code. [1] [2]Miscellaneous Changes:
ExecutionResults
inHelpers/ExecutionResults.cs
to removeinit
accessors for properties that are initialized in the constructor.UpdateWixVersionFileTests.cs
to useCount
instead ofCount()
.