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(cli): add read-only flag #87

Merged
merged 2 commits into from
May 11, 2023
Merged

Conversation

brandonspark
Copy link
Contributor

@brandonspark brandonspark commented May 10, 2023

What:

This PR adds in a --read-only flag, which causes smlfmt to skip interactive confirmation in the negative sense, only parsing all files without previewing or formatting them. It's called read-only, because it just causes the files to be parsed/read, without overwriting or formatting.

Why:

I'm interested in using smlfmt to detect syntax errors in code. I don't need the preview, since I just want the error output, so --preview-only isn't what I want.

How:

Just added a command-line flag.

Test plan:

This is what the flag does on my machine:
image

@brandonspark brandonspark changed the title feat: add unforce flag feat(cli): add unforce flag May 10, 2023
@shwestrick
Copy link
Owner

Seems like a nice feature!

I'm not sold on the name --unforce. The name --no-write might be more self-explanatory? Or perhaps --read-only?

Thoughts?

@brandonspark
Copy link
Contributor Author

@shwestrick I'm fine with --read-only!

image

@brandonspark brandonspark changed the title feat(cli): add unforce flag feat(cli): add read-only flag May 11, 2023
@shwestrick shwestrick merged commit 8bfbf34 into shwestrick:main May 11, 2023
@shwestrick
Copy link
Owner

Great! Thanks for putting it together.

@shwestrick shwestrick mentioned this pull request Nov 1, 2023
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.

2 participants