Skip to content

Commit

Permalink
fix: rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
doudou committed Aug 18, 2024
1 parent 36320e7 commit 2fdfa22
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions lib/autoproj/cli/ci.rb
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,10 @@ def cleanup_build_cache(dir, size_limit)
total_size -= stat.size
end

Autoproj.message format("current build cache size: %.1f GB",
Float(total_size) / 1_000_000_000)
Autoproj.message(
format("current build cache size: %<size>.1f GB",
size: Float(total_size) / 1_000_000_000)
)
total_size
end

Expand Down
2 changes: 1 addition & 1 deletion lib/autoproj/cli/main_ci.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def cache_pull(dir, ignore: [])

# options[:ignore] is not set if we call from another
# command, e.g. build
ignore += (options.delete(:ignore) || [])
ignore += options.delete(:ignore) || []
results = cli.cache_pull(*dir, ignore: ignore)

if report && !report.empty?
Expand Down
2 changes: 1 addition & 1 deletion lib/autoproj/cli/standalone_ci.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class StandaloneCI < Thor
type: :string, default: nil
def rebuild_root(config_dir, cache_root, output)
dir = Dir.mktmpdir
FileUtils.chmod 0755, dir
FileUtils.chmod 0o755, dir

Autoproj::CI::Rebuild.prepare_synthetic_buildroot(
File.join(config_dir, "installation-manifest"),
Expand Down
4 changes: 2 additions & 2 deletions test/autoproj/cli/ci_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -495,10 +495,10 @@ def self.consolidated_report_single_behavior( # rubocop:disable Metrics/AbcSize
end

consolidated_report_single_behavior(
"import", report_path_accessor: ->(ws) { ws.import_report_path }
"import", report_path_accessor: lambda(&:import_report_path)
)
consolidated_report_single_behavior(
"build", report_path_accessor: ->(ws) { ws.build_report_path }
"build", report_path_accessor: lambda(&:build_report_path)
)
consolidated_report_single_behavior(
"test", report_path_accessor: ->(ws) { ws.utility_report_path("test") }
Expand Down

0 comments on commit 2fdfa22

Please sign in to comment.