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

Fix/better new project name handling #1481

Merged
merged 3 commits into from
Jun 21, 2024

Conversation

hugocaillard
Copy link
Collaborator

Description

Fix #1480

  • Ask users if they want to continue if the directory already exists or already contains files (when using .
  • Allow to include path in project name clarinet new path/to/project
  • Sanitize project name (only allow alphanum, -, and _

@hugocaillard hugocaillard requested a review from MicaiahReid June 21, 2024 16:37
Copy link

codecov bot commented Jun 21, 2024

Codecov Report

Attention: Patch coverage is 15.42857% with 148 lines in your changes missing coverage. Please review.

Project coverage is 40.87%. Comparing base (05b268c) to head (52a8a56).

Files Patch % Lines
components/clarinet-cli/src/frontend/cli.rs 24.10% 85 Missing ⚠️
components/clarinet-cli/src/generate/project.rs 0.00% 56 Missing ⚠️
components/clarinet-cli/src/generate/mod.rs 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1481      +/-   ##
==========================================
+ Coverage   40.74%   40.87%   +0.12%     
==========================================
  Files          87       87              
  Lines       32386    32366      -20     
==========================================
+ Hits        13197    13228      +31     
+ Misses      19189    19138      -51     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@MicaiahReid MicaiahReid left a comment

Choose a reason for hiding this comment

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

NICE 🎉

@hugocaillard hugocaillard enabled auto-merge (squash) June 21, 2024 17:14
@hugocaillard hugocaillard merged commit 6ce3af5 into main Jun 21, 2024
19 checks passed
@hugocaillard hugocaillard deleted the fix/better-new-project-name-handling branch June 21, 2024 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Creating a new Clarinet project in the local folder breaks devnet
2 participants