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 function wrapper around kubectl aliases #2166

Merged
merged 1 commit into from
Dec 3, 2022

Conversation

cornfeedhobo
Copy link
Member

@cornfeedhobo cornfeedhobo commented Sep 30, 2022

This is minor house cleaning. I saw the function name and didn't like that it's name wasn't well scoped,
and further, I see no need for wrapping this logic with a function.

Thought for the future: maybe all alias loading should be wrapped in a callable with a predictable name?
e.g. _bash_it_load_alias_<alias plugin name>

Motivation and Context

I don't like polluting the global namespace with poorly named functions

How Has This Been Tested?

See the test output.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • If my change requires a change to the documentation, I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • If I have added a new file, I also added it to clean_files.txt and formatted it using lint_clean_files.sh.
  • I have added tests to cover my changes, and all the new and existing tests pass.

@cornfeedhobo
Copy link
Member Author

The lint test is broken because the test image no longer has brew baked in. There is probably some action we can add, and I'm happy to wait and rebase after that's finished.

Copy link
Contributor

@davidpfarrell davidpfarrell left a comment

Choose a reason for hiding this comment

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

Hiding whitespace shows that this change is simply removing the function wrapper as described.

In the absence of any comments stating why the wrapper might be useful in this case, removing it seems appropriate as its not standard bash-it practice.

Approved

@cornfeedhobo
Copy link
Member Author

cornfeedhobo commented Oct 31, 2022

For posterity, I'm going to rebase and push now that the CI job is fixed. Thanks again for taking care of that.

Edit: The CI job here is still using the old config and I don't know why. I'm going to close and re-open, or maybe open another branch to hopefully get Github to behave.

@cornfeedhobo cornfeedhobo reopened this Oct 31, 2022
@NoahGorny NoahGorny merged commit ec3c06f into Bash-it:master Dec 3, 2022
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.

3 participants