Skip to content

Commit

Permalink
Rubocop: fix Naming/RescuedExceptionsVariableName cop.
Browse files Browse the repository at this point in the history
  • Loading branch information
hainesr committed Apr 30, 2023
1 parent 6b4b084 commit da51713
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 18 deletions.
9 changes: 0 additions & 9 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,6 @@ Naming/FileName:
Exclude:
- 'lib/ucf/meta-inf.rb'

# Offense count: 3
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: PreferredName.
Naming/RescuedExceptionsVariableName:
Exclude:
- 'examples/create-ucf'
- 'examples/ucfinfo'
- 'examples/verify-ucf'

# Offense count: 1
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
# SupportedStyles: snake_case, normalcase, non_integer
Expand Down
6 changes: 3 additions & 3 deletions examples/create-ucf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
# Copyright (c) 2013-2015 The University of Manchester, UK.
# Copyright (c) 2013-2023 The University of Manchester, UK.
#
# All rights reserved.
#
Expand Down Expand Up @@ -66,7 +66,7 @@ begin
# Add a explanation of this file.
c.comment = 'This is an example UCF file!'
end
rescue ZipContainer::MalformedContainerError, ZipContainer::Error => err
puts err.to_s
rescue ZipContainer::MalformedContainerError, ZipContainer::Error => e
puts e.to_s
exit 1
end
6 changes: 3 additions & 3 deletions examples/ucfinfo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
# Copyright (c) 2013-2015 The University of Manchester, UK.
# Copyright (c) 2013-2023 The University of Manchester, UK.
#
# All rights reserved.
#
Expand Down Expand Up @@ -46,8 +46,8 @@ ucffile = ARGV[0]

begin
ucf = UCF::File.open(ucffile)
rescue ZipContainer::MalformedContainerError, ZipContainer::Error => err
puts err.to_s
rescue ZipContainer::MalformedContainerError, ZipContainer::Error => e
puts e.to_s
exit 1
end

Expand Down
6 changes: 3 additions & 3 deletions examples/verify-ucf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
# Copyright (c) 2013-2015 The University of Manchester, UK.
# Copyright (c) 2013-2023 The University of Manchester, UK.
#
# All rights reserved.
#
Expand Down Expand Up @@ -46,7 +46,7 @@ ucffile = ARGV[0]

begin
UCF::File.verify!(ucffile)
rescue ZipContainer::MalformedContainerError, ZipContainer::Error => err
puts err.to_s
rescue ZipContainer::MalformedContainerError, ZipContainer::Error => e
puts e.to_s
exit 1
end

0 comments on commit da51713

Please sign in to comment.