Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Prompt users to try auto-correct #1071

Closed
chao2zhang opened this issue Jan 29, 2021 · 3 comments · Fixed by #2091
Closed

Prompt users to try auto-correct #1071

chao2zhang opened this issue Jan 29, 2021 · 3 comments · Fixed by #2091
Milestone

Comments

@chao2zhang
Copy link
Contributor

chao2zhang commented Jan 29, 2021

Expected Behavior

When there are detected issues that are auto correctible, prompt the users to try -F.
I got questions from multiple devs who are new to Kotlin. They didn't know this option exists and always seem to not understand specific rule violations. For example, we came to this stackoverflow question when trying to understand how to fix FinalNewLine.

Current Behavior

The current cli only reports those detected issues.

Additional information

  • Current version of ktlint: 0.40.0
@shashachu
Copy link
Contributor

@chao2zhang just to clarify - this would be some text output that suggests re-running with -F? or it will actually do a yes/no prompt and re-run?

@chao2zhang
Copy link
Contributor Author

It would be great if we achieve the latter "interactively asking the user", although that requires more technical effort.

@paul-dingemans
Copy link
Collaborator

It would be great if we achieve the latter "interactively asking the user", although that requires more technical effort.

Interactive prompting is nice but not a feature which is requested a lot. For now, just start with a prompt to promote the use of --format when applicable.

@paul-dingemans paul-dingemans added this to the 0.50.0 milestone Jun 26, 2023
paul-dingemans added a commit that referenced this issue Jun 26, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants