-
Notifications
You must be signed in to change notification settings - Fork 249
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
Prompt user to "config migrate" during init process #1409
base: main
Are you sure you want to change the base?
Conversation
Diff Coverage: The code coverage on the diff in this pull request is 0.0%. Total Coverage: This PR will decrease coverage by 0.06%. File Coverage Changes
🛟 Help
|
❌ 1 blocking issue (1 total)
|
Add functionality to detect and migrate existing .codeclimate.yml configurations during qlty initialization. The migration: - Detects existing .codeclimate.yml in project root - Prompts user for migration confirmation (respects --yes/--no flags) - Executes migration using 'qlty config migrate' - Provides success feedback to user This helps users transition from CodeClimate to qlty while preserving their existing configurations.
86e7f30
to
98f4676
Compare
if classic_config_path.exists() { | ||
if !self.no | ||
&& (self.yes | ||
|| Confirm::with_theme(&ColorfulTheme::default()) | ||
.with_prompt( | ||
"Would you like to migrate your .codeclimate.yml configuration?", | ||
) | ||
.default(true) | ||
.show_default(true) | ||
.interact()?) | ||
{ | ||
let migration_settings = MigrationSettings::new( | ||
&workspace.root, | ||
workspace.config()?, | ||
&workspace.config_path()?, | ||
&classic_config_path, | ||
self.dry_run, | ||
)?; | ||
|
||
MigrateConfig::new(migration_settings)?.migrate()?; | ||
self.print_check("Migrated .codeclimate.yml configuration"); | ||
} |
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.
WIP, but the airplane is landing. If a
.codeclimate.yml
file exists in the working directory, ask the user if they would like to migrate the Code Climate config into the qlty.toml config (default to yes).