Project

General

Profile

Actions

Defect #34165

closed

RuboCop warns Layout/SpaceInsideBlockBraces and Layout/SpaceInsideHashLiteralBraces due to r20189 and r20190

Defect #34165: RuboCop warns Layout/SpaceInsideBlockBraces and Layout/SpaceInsideHashLiteralBraces due to r20189 and r20190

Added by Go MAEDA about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Code cleanup/refactoring
Target version:
-
Resolution:
Invalid
Affected version:

Description

RuboCops displays huge numbers of warnings in the latest trunk.

This is because someone changed .ruboco.yml by committing r20189 and r20190. Those can be disabled again by reverting the two commits.

bundle exec rubocop --regenerate-todo
bundle exec rubocop
Offenses:

app/controllers/activities_controller.rb:62:22: C: Layout/SpaceInsideBlockBraces: Space inside { detected.
        format.html { ...

app/controllers/activities_controller.rb:64:50: C: Layout/SpaceInsideBlockBraces: Space inside } detected.
          render :layout => false if request.xhr? ...

.
.
.

test/unit/user_import_test.rb:126:50: C: Layout/SpaceInsideBlockBraces: Space inside { detected.
    first, second, third = new_records(User, 3) { import.run }
                                                 ^
test/unit/user_import_test.rb:126:61: C: Layout/SpaceInsideBlockBraces: Space inside } detected.
    first, second, third = new_records(User, 3) { import.run }
                                                            ^

902 files inspected, 1092 offenses detected, 1092 offenses auto-correctable

Updated by Marius BĂLTEANU about 6 years ago Actions #1

  • Assignee set to Toshi MARUYAMA

Toshi, how do you want to proceed on this? I agree with Go Maeda, there are too many warnings in the current trunk and for sure we won't touch all those files in order to fix them.

Rubocop log output: https://gitlab.com/redmine-org/redmine/-/jobs/812990254

Updated by Toshi MARUYAMA about 6 years ago Actions #3

  • Assignee deleted (Toshi MARUYAMA)

https://github.com/marutosi/redmine/commit/38b487827ca5e3101b09d3e332aa086470a2b4fd

diff --git a/Gemfile b/Gemfile
--- a/Gemfile
+++ b/Gemfile
@@ -92,9 +92,9 @@ group :test do
   gem 'capybara', '~> 3.31.0'
   gem "selenium-webdriver" 
   # RuboCop
-  gem 'rubocop', '~> 1.0.0'
-  gem 'rubocop-performance', '~> 1.8.0'
-  gem 'rubocop-rails', '~> 2.8.0'
+  gem 'rubocop', '~> 0.89.0'
+  gem 'rubocop-performance', '~> 1.5.0'
+  gem 'rubocop-rails', '~> 2.5.0'
 end

 local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")

Updated by Toshi MARUYAMA about 6 years ago Actions #4

  • Subject changed from RuboCop warns Layout/SpaceInsideBlockBraces and Layout/SpaceInsideHashLiteralBraces due to r20189 and r20190 to Down grade rubocop to 0.89.0
  • Assignee set to Go MAEDA

Updated by Toshi MARUYAMA about 6 years ago Actions #5

  • Subject changed from Down grade rubocop to 0.89.0 to Down grade rubocop to 0.89

Updated by Go MAEDA about 6 years ago Actions #6

  • Subject changed from Down grade rubocop to 0.89 to RuboCop warns Layout/SpaceInsideBlockBraces and Layout/SpaceInsideHashLiteralBraces due to r20189 and r20190
  • Assignee changed from Go MAEDA to Jean-Philippe Lang

Updated by Toshi MARUYAMA about 6 years ago Actions #7

  • Status changed from New to Closed
  • Assignee deleted (Jean-Philippe Lang)
  • Resolution set to Invalid
Actions

Also available in: PDF Atom