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 66# Note that changes in the inspected code, or installation of new
77# versions of RuboCop, may require this file to be generated again.
88
9- # Offense count: 1
10- Lint/UselessConstantScoping :
11- Exclude :
12- - ' lib/git/branch.rb'
13-
149# Offense count: 68
1510# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
1611Metrics/AbcSize :
Original file line number Diff line number Diff line change @@ -93,18 +93,6 @@ def to_s
9393 @full
9494 end
9595
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-
10896 BRANCH_NAME_REGEXP = %r{
10997 ^
11098 # Optional 'refs/remotes/' at the beggining to specify a remote tracking branch
@@ -116,6 +104,8 @@ def determine_current
116104 $
117105 }x
118106
107+ private
108+
119109 # Given a full branch name return an Array containing the remote and branch names.
120110 #
121111 # Removes 'remotes' from the beggining of the name (if present).
@@ -143,5 +133,15 @@ def parse_name(name)
143133 branch_name = match [ :branch_name ]
144134 [ remote , branch_name ]
145135 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
146146 end
147147end
You can’t perform that action at this time.
0 commit comments