[error] Inspecting 1 file C
Offenses:
matrix2.rb:160:35: C: Style/TrailingUnderscoreVariable: Do not use trailing _s in parallel assignment. Prefer groups[group_key][dim_key], = create_matrix(jobs). groups[group_key][dim_key], _ = create_matrix(jobs) ^^
Signed-off-by: Lu Kaiyi 2392863668@qq.com --- lib/matrix2.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/matrix2.rb b/lib/matrix2.rb index dfc606e..5f538bd 100644 --- a/lib/matrix2.rb +++ b/lib/matrix2.rb @@ -157,7 +157,7 @@ def combine_group_jobs_list(query_data, groups_params, dimensions, metrics) groups = auto_group_by_template(job_list, groups_params, dimensions, metrics) groups.each do |group_key, dims| dims.each do |dim_key, jobs| - groups[group_key][dim_key], _ = create_matrix(jobs) + groups[group_key][dim_key], = create_matrix(jobs) end end