Skip to content

Commit 2021272

Browse files
committed
Disable Performance/RedundantBlockCall for Sorbet-typed block in CommandTrace.record
Sorbet's block: sig requires the &block param to be named 'block', and the convention in this repo is to invoke it via block.call with an inline disable (matches bun/npm_and_yarn constraint_helper.rb).
1 parent 3e4544a commit 2021272

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater/command_trace.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def self.record(traces:, package_manager:, command:, fingerprint: nil, &block)
144144

145145
start = T.let(Process.clock_gettime(Process::CLOCK_MONOTONIC), Numeric)
146146
begin
147-
result = block.call
147+
result = block.call # rubocop:disable Performance/RedundantBlockCall
148148
record_success(trace, start, result)
149149
result
150150
rescue Dependabot::SharedHelpers::HelperSubprocessFailed => e

0 commit comments

Comments
 (0)