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

cli: add validate command #2415

Merged
merged 6 commits into from
Mar 11, 2025
Merged

cli: add validate command #2415

merged 6 commits into from
Mar 11, 2025

Conversation

melsonic
Copy link
Contributor

@melsonic melsonic commented Mar 9, 2025

image

/fixes #2410

@melsonic melsonic marked this pull request as ready for review March 10, 2025 17:24
Copy link
Collaborator

@alixander alixander left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for taking this!

For the error case, can we just print out the errors without "failed to validate"? Technically, it successfully validated it to be incorrect.

For success, I always like printing something out to let users know their command worked. "Success! [x.d2] is valid D2."

Can you add a test to e2etests-cli please?

@melsonic
Copy link
Contributor Author

melsonic commented Mar 10, 2025

Awesome, thanks for taking this!

For the error case, can we just print out the errors without "failed to validate"? Technically, it successfully validated it to be incorrect.

Yeah, we should be able to do that.

For success, I always like printing something out to let users know their command worked. "Success! [x.d2] is valid D2."

Sure, I also thought about that, for better ux.

Can you add a test to e2etests-cli please?

I'll look into it.

@melsonic
Copy link
Contributor Author

Hey @alixander, should we print "Success! input is valid D2." in case of Stdin.

Copy link
Collaborator

@alixander alixander left a comment

Choose a reason for hiding this comment

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

Can you sign your commits please? We have it as an org-wide setting

@melsonic melsonic force-pushed the issue-2410 branch 2 times, most recently from 8b045cd to b8742f7 Compare March 11, 2025 18:20
@melsonic
Copy link
Contributor Author

Hey @alixander, updated the PR with signed commits and updated with your suggested changes.

Copy link
Collaborator

@alixander alixander left a comment

Choose a reason for hiding this comment

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

LGTM!

@alixander alixander merged commit 38851ef into terrastruct:master Mar 11, 2025
3 checks passed
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.

Validate command
2 participants