Commit 54428b21 authored by Shubham Kumar's avatar Shubham Kumar Committed by Peter Leitzen

Resolve rubocop offense Migration/DepartmentName

parent 84831bb0
......@@ -222,12 +222,6 @@ Metrics/CyclomaticComplexity:
Metrics/PerceivedComplexity:
Max: 25
# Offense count: 1
# Cop supports --auto-correct.
Migration/DepartmentName:
Exclude:
- 'app/models/commit.rb'
# Offense count: 196
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, Regex, IgnoreExecutableScripts, AllowedAcronyms.
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
......
......@@ -62,7 +62,7 @@ class Commit
collection.sort do |a, b|
operands = [a, b].tap { |o| o.reverse! if sort == 'desc' }
attr1, attr2 = operands.first.public_send(order_by), operands.second.public_send(order_by) # rubocop:disable PublicSend
attr1, attr2 = operands.first.public_send(order_by), operands.second.public_send(order_by) # rubocop:disable GitlabSecurity/PublicSend
# use case insensitive comparison for string values
order_by.in?(%w[email name]) ? attr1.casecmp(attr2) : attr1 <=> attr2
......
---
title: Fixes rubocop offense Migration/DepartmentName
merge_request: 56997
author: Shubham Kumar (@imskr)
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment