From 7fdbad58c138852b379d04a3246c3a7fba7fc597 Mon Sep 17 00:00:00 2001 From: "Ben Sheldon [he/him]" Date: Thu, 10 Aug 2023 14:34:09 -0700 Subject: [PATCH] Add failure output for Sorbet linter --- bin/lint | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bin/lint b/bin/lint index 4900a0996..58e8b384f 100755 --- a/bin/lint +++ b/bin/lint @@ -11,14 +11,20 @@ end.parse! GEM_ROOT = File.expand_path('..', __dir__) -def system!(*args) - system(*args) || abort("\n== Command #{args} failed ==") +def system!(*args, failure: nil) + system(*args) || abort("\n== Command #{args} failed ==#{failure ? "\n\n#{failure}" : ''}}") end FileUtils.chdir GEM_ROOT do puts "\n== Sorbet ==" - system! "bundle exec srb tc" + system! "bundle exec srb tc", failure: <<~MESSAGE + You may need to run one of the following commands + - bin/tapioca todo # generate RBI files for unresolved constants (e.g. RSpec `stub_const`) + - bin/tapioca dsl # generate RBIs for dynamic methods + - bin/tapioca gem # generate RBIs for gems + - bin/tapioca check-shims # check duplicated definitions in shim RBIs + MESSAGE puts "\n== Rubocop =="