Skip to content

Commit

Permalink
Auto-correct Style/RedundantBegin cop offences
Browse files Browse the repository at this point in the history
It is newly added at 7b6b105.

```
% be rubocop -a
Inspecting 2781 files
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Offenses:

activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:12:1: C: [Corrected] Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body beginning.
activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:12:1: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected.
activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:12:13: C: [Corrected] Style/RedundantBegin: Redundant begin block detected.
            begin
            ^^^^^
activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:13:11: C: [Corrected] Layout/IndentationWidth: Use 2 (not 4) spaces for indentation.
              Rails.autoloaders.main.reload
          ^^^^
activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:16:1: C: [Corrected] Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body end.
activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:16:1: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected.

2781 files inspected, 6 offenses detected, 6 offenses corrected
```
  • Loading branch information
kamipo committed Apr 11, 2019
1 parent 936603f commit b031d42
Showing 1 changed file with 3 additions and 5 deletions.
Expand Up @@ -9,11 +9,9 @@ module ZeitwerkIntegration # :nodoc: all
module Decorations
def clear
Dependencies.unload_interlock do
begin
Rails.autoloaders.main.reload
rescue Zeitwerk::ReloadingDisabledError
raise "reloading is disabled because config.cache_classes is true"
end
Rails.autoloaders.main.reload
rescue Zeitwerk::ReloadingDisabledError
raise "reloading is disabled because config.cache_classes is true"
end
end

Expand Down

0 comments on commit b031d42

Please sign in to comment.