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

Throw exception in Baseline load instead of printing log message #2344

Closed
paul-dingemans opened this issue Nov 6, 2023 · 0 comments · Fixed by #2362
Closed

Throw exception in Baseline load instead of printing log message #2344

paul-dingemans opened this issue Nov 6, 2023 · 0 comments · Fixed by #2362
Milestone

Comments

@paul-dingemans
Copy link
Collaborator

The ktlint-intelli-plugin loads the baseline file via function loadBaseline(path: String). In case that an error occurs the BaselineLoader only prints a log message but does not throw an exception. As a result the plugin can not catch the error and is therefore not able to provide feedback to users. It would be nice in case the BaselineLoader can be configured to thrown an exception -or- print the log message.

@paul-dingemans paul-dingemans added this to the 1.1 milestone Nov 15, 2023
paul-dingemans added a commit that referenced this issue Nov 18, 2023
The caller should be able to determine how errors while loading the baseline are to be handled. The ktlint CLI expects errors to be printed to the log. The ktlint-intellij-plugin requires exceptions to be thrown as the log is invisible for the plugin.

Closes #2344
paul-dingemans added a commit that referenced this issue Nov 19, 2023
* Support logging and exception throwing when loading baseline

The caller should be able to determine how errors while loading the baseline are to be handled. The ktlint CLI expects errors to be printed to the log. The ktlint-intellij-plugin requires exceptions to be thrown as the log is invisible for the plugin.

Closes #2344
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant