File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed
Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,7 @@ Style/SafeNavigation:
244244Style/SignalException :
245245 Exclude :
246246 - Rakefile
247+ - " **/*.rake"
247248
248249# We use these sparingly, where we anticipate future branches for the
249250# inner conditional.
Original file line number Diff line number Diff line change @@ -59,12 +59,19 @@ multitask(:syntax_tree) do
5959 # 2. at label `l1`, join previously annotated line with `class | module` information.
6060 pst = sed + [ subst , "--" ]
6161
62+ success = false
63+
6264 # transform class aliases to type aliases, which syntax tree has no trouble with
6365 sh ( "#{ find . shelljoin } | #{ pre . shelljoin } " )
6466 # run syntax tree to format `*.rbs` files
65- sh ( "#{ find . shelljoin } | #{ fmt . shelljoin } " )
67+ sh ( "#{ find . shelljoin } | #{ fmt . shelljoin } " ) do
68+ success = _1
69+ end
6670 # transform type aliases back to class aliases
6771 sh ( "#{ find . shelljoin } | #{ pst . shelljoin } " )
72+
73+ # always run post-processing to remove comment marker
74+ fail unless success
6875end
6976
7077multitask ( format : [ :ruboformat , :syntax_tree ] )
Original file line number Diff line number Diff line change @@ -110,7 +110,9 @@ def coerce(value, state:)
110110 #
111111 # @return [String]
112112 def inspect ( depth : 0 )
113- return super ( ) if depth . positive?
113+ if depth . positive?
114+ return is_a? ( Module ) ? super ( ) : self . class . name
115+ end
114116
115117 members = values . map { Orb ::Internal ::Type ::Converter . inspect ( _1 , depth : depth . succ ) }
116118 prefix = is_a? ( Module ) ? name : self . class . name
Original file line number Diff line number Diff line change @@ -230,7 +230,9 @@ def dump(value, state:)
230230 #
231231 # @return [String]
232232 def inspect ( depth : 0 )
233- return super ( ) if depth . positive?
233+ if depth . positive?
234+ return is_a? ( Module ) ? super ( ) : self . class . name
235+ end
234236
235237 members = variants . map { Orb ::Internal ::Type ::Converter . inspect ( _1 , depth : depth . succ ) }
236238 prefix = is_a? ( Module ) ? name : self . class . name
You can’t perform that action at this time.
0 commit comments