Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## [Unreleased]
*no unreleased changes*
### Changed
* Linting: return a zero exit status when there are no lintable changes (#97)

## 5.10.2 / 2021-02-15
### Fixed
Expand Down
17 changes: 9 additions & 8 deletions lib/ndr_dev_support/rubocop/reporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ def initialize(offenses)
# Prints out a report, and returns an appriopriate
# exit status for the rake task to terminate with.
def report
if @offenses.any?
print_summary
puts
print_offenses
return @offenses.values.all?(&:empty?)
else
puts Rainbow('No relevant changes found.').yellow
return false
if @offenses.none?
warn Rainbow('No relevant changes found.').yellow
return true
end

print_summary
puts
print_offenses

@offenses.values.all?(&:empty?)
end

private
Expand Down