-
Notifications
You must be signed in to change notification settings - Fork 17
fix: enforce snake case app name #54
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
fix: enforce snake case app name #54
Conversation
Marked as draft. Want to validate all rules for valid Dart app names as well as make the code cleaner. |
If use |
@nikitiser do you mean the version of this PR or the current version of Stacked? If you found an issue you feel this resolves please file an issue referencing this PR. If you mean this PR, could you please clarify? |
Thanks for the clarification, should be fairly simple to implement. I'll add it to this PR tomorrow and we can decide to either keep it or split it out before merging. |
Oh, @nikitiser. A question, would you expect it to only work in an empty folder or one with stuff already added. The latter would be a lot bigger of a task and might be better implemented as a new |
@Pebkac03 I meant in an empty folder. If it is not empty, there should probably be an error for |
Alright, will add an error for that case as well. Thanks for the hasty reply! |
Sorry for the late reply but when digging deeper I found a flaw in the logging. The CLI currently only logs process.stdout and not process.stderr when running commands. In short, it logs info to the terminal but not error messages. I have a working implementation not commited yet but since it's a bigger change affecting all commands it needs more discussion and work. Will commit when i can so anyone can look through it. |
Closing this in favour of #57. Will look into adding |
Checks if app name is snake_case when running: stacked create app. Fixes Stacked-Org/stacked#1081.
<originalAppName> is not snake_case as required by dart, did you mean <appName?> [Y/N]
. If they answer yes then the app name will be changed, if they answer no then the program will throw and exit with the message:error: project name not snake_case
.