Skip to content

Commit

Permalink
Style/Semicolon
Browse files Browse the repository at this point in the history
  • Loading branch information
ggilder committed Feb 16, 2015
1 parent 24b145a commit 365d4c5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
10 changes: 2 additions & 8 deletions .rubocop_todo.yml
Expand Up @@ -37,7 +37,7 @@ Metrics/AbcSize:
# Offense count: 1
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 227
Max: 230

# Offense count: 4
Metrics/CyclomaticComplexity:
Expand All @@ -51,7 +51,7 @@ Metrics/LineLength:
# Offense count: 7
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 33
Max: 36

# Offense count: 4
Metrics/PerceivedComplexity:
Expand Down Expand Up @@ -122,12 +122,6 @@ Style/Not:
Style/RescueModifier:
Enabled: false

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: AllowAsExpressionSeparator.
Style/Semicolon:
Enabled: false

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Expand Down
5 changes: 4 additions & 1 deletion lib/commander/runner.rb
Expand Up @@ -57,7 +57,10 @@ def run!
command(:help).run(*args)
return
end
global_option('-v', '--version', 'Display version information') { say version; return }
global_option('-v', '--version', 'Display version information') do
say version
return
end
global_option('-t', '--trace', 'Display backtrace when an error occurs') { trace = true } unless @never_trace || @always_trace
parse_global_options
remove_global_options options, @args
Expand Down
6 changes: 4 additions & 2 deletions lib/commander/user_interaction.rb
Expand Up @@ -285,7 +285,8 @@ def enable_paging

if Kernel.fork
$stdin.reopen read
write.close; read.close
write.close
read.close
Kernel.select [$stdin]
ENV['LESS'] = 'FSRX' unless ENV.key? 'LESS'
pager = ENV['PAGER'] || 'less'
Expand All @@ -294,7 +295,8 @@ def enable_paging
# subprocess
$stdout.reopen write
$stderr.reopen write if $stderr.tty?
write.close; read.close
write.close
read.close
end
rescue NotImplementedError
ensure
Expand Down

0 comments on commit 365d4c5

Please sign in to comment.