Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
54428b21
Commit
54428b21
authored
Mar 23, 2021
by
Shubham Kumar
Committed by
Peter Leitzen
Mar 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve rubocop offense Migration/DepartmentName
parent
84831bb0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
+6
-7
.rubocop_todo.yml
.rubocop_todo.yml
+0
-6
app/models/commit.rb
app/models/commit.rb
+1
-1
changelogs/unreleased/pl-rubocop-todo-department-name.yml
changelogs/unreleased/pl-rubocop-todo-department-name.yml
+5
-0
No files found.
.rubocop_todo.yml
View file @
54428b21
...
...
@@ -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
...
...
app/models/commit.rb
View file @
54428b21
...
...
@@ -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
...
...
changelogs/unreleased/pl-rubocop-todo-department-name.yml
0 → 100644
View file @
54428b21
---
title
:
Fixes rubocop offense Migration/DepartmentName
merge_request
:
56997
author
:
Shubham Kumar (@imskr)
type
:
fixed
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment