Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix #1543
Canges of API
Add
RBS::CLI::Validate
I consolidated the behavior for validation into a single class, making it easier to divide the code using methods and such.
Add
RBS::WillSyntaxError
By transitioning from printing strings to using error classes, I've made it possible to display parts of the code using
detailed_message
.Changes of CLI
Report by logger
By changing from direct display to stdout to using a logger, I've made it possible to differentiate displays by adjusting log levels.
--silent
is deprecatedWith the introduction of log levels, the
--silent
option has become redundant, so I have marked it for deprecation.Details of Behavior for Different Options
no option
It will report as many validation errors as possible. Warnings and errors are separated by log levels.
If there is even one error, the process will end with
exit 1
.--fail-fast
If validation fails, it will be reported immediately and the process will end. This is similar to the traditional individual validation.
--exit-error-on-syntax-error
It will report all errors, including syntax errors, but if there is even one syntax error, the process will terminate with
exit 1
.--fail-fast --exit-error-on-syntax-error
Even syntax errors, which would not normally be considered failures, will be treated as errors and the process will immediately terminate with
exit 1
.