-
Notifications
You must be signed in to change notification settings - Fork 10
fix: fix Lizard analysis run and configuration creation CF-1999 #178
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
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
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 fixes critical bugs in Lizard analysis execution and configuration generation, and refactors the configsetup package for better maintainability.
Key changes:
- Corrects Lizard runner to properly handle non-linter exit codes by checking stderr instead of exit status
- Fixes Lizard configuration creation to use PatternConfiguration parameters instead of PatternDefinition defaults
- Refactors cmd/configsetup/setup.go by splitting it into 5 focused files for better code organization
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/lizard/lizardRunner.go | Fixed error handling to use stderr checking instead of exit code interpretation |
| tools/lizard/lizardConfigCreator.go | Corrected to extract threshold parameters from PatternConfiguration instead of PatternDefinition |
| cmd/configsetup/tool_creators.go | New file containing tool configuration creator implementations (moved from setup.go) |
| cmd/configsetup/setup.go | Reduced to interface definition only, all implementations moved to separate files |
| cmd/configsetup/repository_config.go | New file containing repository configuration functions (moved from setup.go) |
| cmd/configsetup/default_config.go | New file containing default configuration functions (moved from setup.go) |
| cmd/configsetup/config_creators.go | New file containing general config file creators (moved from setup.go) |
| cmd/configsetup/codacy_yaml.go | New file containing Codacy YAML template generation functions (moved from setup.go) |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
patternDefinition, but those are the default parameters set in the pattern's definition. It had to check the parameters inpatternConfigurationinstead.https://codacy.atlassian.net/browse/CF-1999