Skip to content

feat: refactor options can be provided via the config file #714

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

Closed
wants to merge 1 commit into from

Conversation

otaviomacedo
Copy link
Contributor

Allow the user to pass options via the config file:

{
  "app": "node bin/main.js",
  "refactor": {
    "dryRun": true
  }
}

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added the p2 label Jul 14, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team July 14, 2025 10:14
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Project coverage is 80.04%. Comparing base (286b063) to head (7d98f60).

Files with missing lines Patch % Lines
packages/aws-cdk/lib/cli/cli.ts 0.00% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #714      +/-   ##
==========================================
+ Coverage   79.38%   80.04%   +0.65%     
==========================================
  Files          49       49              
  Lines        7209     7215       +6     
  Branches      809      817       +8     
==========================================
+ Hits         5723     5775      +52     
+ Misses       1467     1418      -49     
- Partials       19       22       +3     
Flag Coverage Δ
suite.unit 80.04% <0.00%> (+0.65%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@rix0rrr rix0rrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have two questions here:

  • Can you give me an example of the use cases for this? I'm struggling to think why a user would choose to always run cdk refactor in dryrun mode.
  • This seems like a one-off solution for refactoring. Should we not build it in such a way that it works for all commands?

@otaviomacedo
Copy link
Contributor Author

I have two questions here:

* Can you give me an example of the use cases for this? I'm struggling to think why a user would choose to always run `cdk refactor` in dryrun mode.

* This seems like a one-off solution for refactoring. Should we not build it in such a way that it works for all commands?

Yeah, you're right. I'll just close it and revisit this feature if someone asks for it.

auto-merge was automatically disabled July 15, 2025 15:09

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants