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

Feat: Improve feedback on invalid name in new command and add CLI prompt to recover #3422

Closed

Conversation

Tar-Tarus
Copy link
Contributor

This PR resolves #1728

Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

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

Hello! Thank you.

Let's make this print all the requirements for a name, as the ticket suggested.

For suggesting a new name, let's print something like Hint: try the_fixed_project_name if we can determine a suitable alternative. We can determine it by converting the project name to snake case and seeing if that passes.

This can be implemented in the error module and can be tested using snapshots, one for each kind of invalid name that we might encounter.

};
validate_name(&replacement_name)?;

if cfg!(test) {
Copy link
Member

Choose a reason for hiding this comment

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

Remove this please. We never use conditional test code.

@lpil lpil marked this pull request as draft July 22, 2024 12:38
@lpil
Copy link
Member

lpil commented Dec 2, 2024

Closing due to inactivity, please feel free to reopen. Thank you

@lpil lpil closed this Dec 2, 2024
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.

Restricted Project Naming
2 participants