File tree Expand file tree Collapse file tree 2 files changed +12
-17
lines changed Expand file tree Collapse file tree 2 files changed +12
-17
lines changed Original file line number Diff line number Diff line change 6
6
# Note that changes in the inspected code, or installation of new
7
7
# versions of RuboCop, may require this file to be generated again.
8
8
9
- # Offense count: 1
10
- Lint/UselessConstantScoping :
11
- Exclude :
12
- - ' lib/git/branch.rb'
13
-
14
9
# Offense count: 68
15
10
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
16
11
Metrics/AbcSize :
Original file line number Diff line number Diff line change @@ -93,18 +93,6 @@ def to_s
93
93
@full
94
94
end
95
95
96
- private
97
-
98
- def check_if_create
99
- @base . lib . branch_new ( @name )
100
- rescue StandardError
101
- nil
102
- end
103
-
104
- def determine_current
105
- @base . lib . branch_current == @name
106
- end
107
-
108
96
BRANCH_NAME_REGEXP = %r{
109
97
^
110
98
# Optional 'refs/remotes/' at the beggining to specify a remote tracking branch
@@ -116,6 +104,8 @@ def determine_current
116
104
$
117
105
}x
118
106
107
+ private
108
+
119
109
# Given a full branch name return an Array containing the remote and branch names.
120
110
#
121
111
# Removes 'remotes' from the beggining of the name (if present).
@@ -143,5 +133,15 @@ def parse_name(name)
143
133
branch_name = match [ :branch_name ]
144
134
[ remote , branch_name ]
145
135
end
136
+
137
+ def check_if_create
138
+ @base . lib . branch_new ( @name )
139
+ rescue StandardError
140
+ nil
141
+ end
142
+
143
+ def determine_current
144
+ @base . lib . branch_current == @name
145
+ end
146
146
end
147
147
end
You can’t perform that action at this time.
0 commit comments