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

Toolshed coding conventions #210

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

0x6273
Copy link
Contributor

@0x6273 0x6273 commented Apr 29, 2024

Adds coding conventions for toolshed. There are a few inconsistencies I've noticed, which this PR will standardize:

  • Some toolshed commands are defined in a Commands namespace/directory, some in a Toolshed namespace/directory, and some are just put directly under Content.Server/Whatever.
  • Most command names use all lowercase, but some use camelCase (stations:rerollBounties) or snake_case (physics:angular_velocity).
  • Some command groups use singular (player:list) and some use plural (stations:list).

Comment on lines +437 to +439
- Toolshed commands should be all lowercase without underscores.
Example: `station:largestgrid`
NOT: `station:largest_grid`, `station:largestGrid`
Copy link
Contributor

Choose a reason for hiding this comment

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

can we fix everything to use snake_case instead for readability reasons, thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree snake_case would help with readability. I based these conventions of what was more common, since I only found a single case of a command being snake_case.

Toolshed currently uses all lowercase when autogenerating command name from the class name, so this would have to be changed, along with renaming all subcommands and updating docs.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree snake_case would help with readability. I based these conventions of what was more common, since I only found a single case of a command being snake_case.

Toolshed currently uses all lowercase when autogenerating command name from the class name, so this would have to be changed, along with renaming all subcommands and updating docs.

yes, i know what toolshed does; i wrote it and I was wrong and would much prefer we fix that.

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.

None yet

2 participants