Skip to content

Commit

Permalink
Fix RuboCop violations
Browse files Browse the repository at this point in the history
  • Loading branch information
vinistock committed Feb 20, 2024
1 parent 5be62b1 commit 3ad5e27
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/tapioca/dsl/pipeline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def run(&blk)
.sort_by! { |c| T.must(Runtime::Reflection.name_of(c)) }

# It's OK if there are no constants to process if we received a valid file/path.
if constants_to_process.empty? && requested_paths.select { |p| File.exist?(p) }.empty?
if constants_to_process.empty? && requested_paths.none? { |p| File.exist?(p) }
report_error(<<~ERROR)
No classes/modules can be matched for RBI generation.
Please check that the requested classes/modules include processable DSL methods.
Expand Down
4 changes: 2 additions & 2 deletions spec/helpers/mock_project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ def bundle_exec(command, env = {})
end
def tapioca(command, enforce_typechecking: true, exclude: tapioca_dependencies)
exec_command = ["tapioca", command]
if command.start_with?(/gem/)
if command.start_with?("gem")
exec_command << "--workers=1" unless command.match?("--workers")
exec_command << "--no-doc" unless command.match?("--doc")
exec_command << "--no-loc" unless command.match?("--loc")
exec_command << "--exclude #{exclude.join(" ")}" unless command.match?("--exclude") || exclude.empty?
elsif command.start_with?(/dsl/)
elsif command.start_with?("dsl")
exec_command << "--workers=1" unless command.match?("--workers")
end

Expand Down
2 changes: 1 addition & 1 deletion spec/tapioca/dsl/compilers/active_support_concern_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def arguments_to_micm_in_effective_order(rbi)
rbi.scan(/mixes_in_class_methods (.*)$/)
.flatten
.reverse
.map { |i| i.sub(/::/, "") }
.map { |i| i.sub("::", "") }
end
end
end
Expand Down

0 comments on commit 3ad5e27

Please sign in to comment.