-
-
Notifications
You must be signed in to change notification settings - Fork 411
Add --fail-on-warning option #1093
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
Conversation
|
Fixed typo and pushed forcibly |
lib/yard/cli/yardoc.rb
Outdated
| # @since 0.7.0 | ||
| attr_accessor :has_markup | ||
|
|
||
| # @return [Boolean] whether yard exits with error status code if an warning occurs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: if an warning => if a warning
lib/yard/cli/yardoc.rb
Outdated
| end | ||
| end | ||
|
|
||
| exit 1 if fail_on_warning && log.warned |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use abort instead of exit 1 - the (slight) benefit abort has is that the provided failing exit status code is something which works for the current platform.
lib/yard/cli/yardoc.rb
Outdated
| excluded << path | ||
| end | ||
|
|
||
| opts.on('--fail-on-warning', 'Exit with error status code if an warning occurs') do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo an warning => a warning
lib/yard/logging.rb
Outdated
| super | ||
| end | ||
|
|
||
| # Remember an warning occurs and writes a warning message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps: Remembers when a warning ...
olleolleolle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a nice feature!
|
@olleolleolle Thanks for reviewing 👍 |
|
Any reason this hasn't been merged? If so is there anything I can do help it along? I'd like to have yard validation a part of our PR review checks |
|
@yoshiwaan Would this project serve your needs for that? https://github.com/zverok/yard-junk |
Description
Add
--fail-on-warningoption. See #935Completed Tasks
bundle exec rakelocally (if code is attached to PR).