Skip to content
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

Exit with status code 1 when consts are found #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
8 changes: 7 additions & 1 deletion collector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ def validate_const(namespaced_const_string)

runner =
Class.new(Parser::Runner) do
class << self
attr_accessor :_has_errors
end

def runner_name
"dudu"
end
Expand All @@ -81,7 +85,9 @@ def show(collection)
return if collection.empty?
puts
collection.each { |pair| puts pair.join("\t") }
self.class._has_errors = true
end
end

runner.go(ARGV)
runner.go(ARGV)
exit 1 if runner._has_errors