Skip to content
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

Remove unused code #4072

Merged
merged 1 commit into from
Dec 16, 2024
Merged

Remove unused code #4072

merged 1 commit into from
Dec 16, 2024

Conversation

sethboyles
Copy link
Member

@sethboyles sethboyles commented Nov 4, 2024

I was trying out this gem debride, which attempts to identify unused code in Ruby.

Due to the dynamic and meta-programmatic nature of Ruby/CCNG, there were a lot of false positives, and these were a few that I believe can safely be removed.

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

@sethboyles sethboyles marked this pull request as ready for review November 4, 2024 23:48
@sethboyles sethboyles force-pushed the remove-unused-methods branch from 3f4c23c to 9e405ee Compare November 5, 2024 00:09
@sethboyles sethboyles force-pushed the remove-unused-methods branch from 9e405ee to 5f9b92c Compare November 5, 2024 17:42
@sethboyles sethboyles requested review from a team November 7, 2024 18:03
@@ -17,7 +17,7 @@

module VCAP::CloudController
class Runner
attr_reader :config, :config_file, :insert_seed_data, :secrets_file
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible that this is used by a rake task or pipeline that wasn't loaded into the debride analysis context?

Copy link
Member Author

Choose a reason for hiding this comment

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

There's no reference to it in cloud_controller_ng or capi-release. capi-release has references to CCNG's Drain code that debride didn't catch, but as far as I can tell that is the only place CCNG's code is referenced externally (and arguably should be replaced with a rake task)

Copy link
Member

@moleske moleske left a comment

Choose a reason for hiding this comment

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

My favorite kind of code change, deletion

@sethboyles sethboyles merged commit b5adbf3 into main Dec 16, 2024
8 checks passed
@sethboyles sethboyles deleted the remove-unused-methods branch December 16, 2024 22:14
ari-wg-gitbot added a commit to cloudfoundry/capi-release that referenced this pull request Dec 17, 2024
Changes in cloud_controller_ng:

- Remove unused code
    PR: cloudfoundry/cloud_controller_ng#4072
    Author: Seth Boyles <seth.boyles@broadcom.com>

Dependency updates in cloud_controller_ng:

- build(deps-dev): bump rubocop-rspec from 3.2.0 to 3.3.0
    PR: cloudfoundry/cloud_controller_ng#4139
    Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants