Skip to content

Conversation

@apostasie
Copy link
Contributor

@apostasie apostasie commented Feb 27, 2025

This is a suggestion following on #3913

These changes are purely cosmetic, and their purpose is to increase code readability, by removing stuttering information from variables and functions name (following the refactor of cmd this last summer), and overall simplifying names.

This applies solely to cmd/

For now, these changes are solely on apparmor, so that we can talk about them.

If this is the right thing to do and we agree on the changes, I will apply them to the entirety of cmd and submit a complete / working PR.

The proposed changes are:

  • rename all newThingPackageCommand function names to thingCommand:
  • rename all packageThingAction function names to thingAction
  • rename all processPackageThingOptions function names to thingOptions
  • rename top-level NewPackageCommand unique functions to Command
  • expand Ls, Rm, to List, Remove where applicable

Reasoning is that:

  • Package always stutter now that they are split under cmd
  • new, or process does not add much value if any and is just noisy
  • acronyms are bad

Thanks.

Tagging @AkihiroSuda for opinion.

@apostasie apostasie force-pushed the refactor-cleanup-1 branch 2 times, most recently from c4dc30a to 2a65aee Compare February 28, 2025 19:39
Signed-off-by: apostasie <spam_blackhole@farcloser.world>
@apostasie apostasie marked this pull request as ready for review February 28, 2025 20:38
@AkihiroSuda AkihiroSuda added this to the v2.0.4 milestone Mar 3, 2025
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda AkihiroSuda merged commit 892a8bb into containerd:main Mar 3, 2025
30 checks passed
@apostasie apostasie changed the title Cleanup/refactor proposal Refactor: cleanup cmd variable names Mar 3, 2025
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.

2 participants