diff options
author | Go MAEDA <maeda@farend.jp> | 2024-08-12 07:42:12 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2024-08-12 07:42:12 +0000 |
commit | de76bb3a4a00146f8d53dbc25f2e90ca99910a22 (patch) | |
tree | 9927c2a114ec980e8c0584f615754db0ea2d0162 | |
parent | 0c28b0974adb3d9f777fbf0cc9234b1a7de144bf (diff) | |
download | redmine-de76bb3a4a00146f8d53dbc25f2e90ca99910a22.tar.gz redmine-de76bb3a4a00146f8d53dbc25f2e90ca99910a22.zip |
Fix RuboCop offense Layout/EmptyLinesAroundClassBody, one of the offenses enabled in rubocop-rails-omakase (#39887).
git-svn-id: https://svn.redmine.org/redmine/trunk@22949 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | .rubocop_todo.yml | 22 | ||||
-rw-r--r-- | db/migrate/001_setup.rb | 1 | ||||
-rw-r--r-- | db/migrate/007_create_journals.rb | 1 | ||||
-rw-r--r-- | db/migrate/20110223180953_salt_user_passwords.rb | 1 | ||||
-rw-r--r-- | db/migrate/20131215104612_store_relation_type_in_journal_details.rb | 1 | ||||
-rw-r--r-- | db/migrate/20180923082945_change_sqlite_booleans_to_0_and_1.rb | 1 | ||||
-rw-r--r-- | lib/redmine/notifiable.rb | 1 | ||||
-rw-r--r-- | lib/redmine/scm/adapters/cvs_adapter.rb | 1 | ||||
-rw-r--r-- | lib/redmine/scm/adapters/filesystem_adapter.rb | 1 | ||||
-rw-r--r-- | lib/redmine/wiki_formatting/html_parser.rb | 1 | ||||
-rw-r--r-- | lib/redmine/wiki_formatting/markdown/html_parser.rb | 1 | ||||
-rw-r--r-- | lib/redmine/wiki_formatting/textile/html_parser.rb | 1 | ||||
-rw-r--r-- | test/integration/api_test/api_routing_test.rb | 1 | ||||
-rw-r--r-- | test/integration/lib/redmine/themes_test.rb | 1 | ||||
-rw-r--r-- | test/integration/routing/activities_test.rb | 1 | ||||
-rw-r--r-- | test/integration/routing/repositories_test.rb | 1 | ||||
-rw-r--r-- | test/unit/lib/redmine/field_format/link_format_test.rb | 1 |
17 files changed, 0 insertions, 38 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index d04d45727..1656de0cd 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -45,28 +45,6 @@ Layout/EmptyLinesAroundAttributeAccessor: - 'test/unit/lib/redmine/safe_attributes_test.rb' # This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: EnforcedStyle. -# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only -Layout/EmptyLinesAroundClassBody: - Exclude: - - 'db/migrate/001_setup.rb' - - 'db/migrate/007_create_journals.rb' - - 'db/migrate/20110223180953_salt_user_passwords.rb' - - 'db/migrate/20131215104612_store_relation_type_in_journal_details.rb' - - 'db/migrate/20180923082945_change_sqlite_booleans_to_0_and_1.rb' - - 'lib/redmine/notifiable.rb' - - 'lib/redmine/scm/adapters/cvs_adapter.rb' - - 'lib/redmine/scm/adapters/filesystem_adapter.rb' - - 'lib/redmine/wiki_formatting/html_parser.rb' - - 'lib/redmine/wiki_formatting/markdown/html_parser.rb' - - 'lib/redmine/wiki_formatting/textile/html_parser.rb' - - 'test/integration/api_test/api_routing_test.rb' - - 'test/integration/lib/redmine/themes_test.rb' - - 'test/integration/routing/activities_test.rb' - - 'test/integration/routing/repositories_test.rb' - - 'test/unit/lib/redmine/field_format/link_format_test.rb' - -# This cop supports safe autocorrection (--autocorrect). Layout/EmptyLinesAroundExceptionHandlingKeywords: Exclude: - 'app/controllers/activities_controller.rb' diff --git a/db/migrate/001_setup.rb b/db/migrate/001_setup.rb index 1cd569403..a2ae11f67 100644 --- a/db/migrate/001_setup.rb +++ b/db/migrate/001_setup.rb @@ -16,7 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class Setup < ActiveRecord::Migration[4.2] - class User < ActiveRecord::Base end diff --git a/db/migrate/007_create_journals.rb b/db/migrate/007_create_journals.rb index 0d1201406..c938d85b7 100644 --- a/db/migrate/007_create_journals.rb +++ b/db/migrate/007_create_journals.rb @@ -1,5 +1,4 @@ class CreateJournals < ActiveRecord::Migration[4.2] - # model removed, but needed for data migration class IssueHistory < ActiveRecord::Base; belongs_to :issue; end # model removed diff --git a/db/migrate/20110223180953_salt_user_passwords.rb b/db/migrate/20110223180953_salt_user_passwords.rb index df2b486f7..9cf79585a 100644 --- a/db/migrate/20110223180953_salt_user_passwords.rb +++ b/db/migrate/20110223180953_salt_user_passwords.rb @@ -1,5 +1,4 @@ class SaltUserPasswords < ActiveRecord::Migration[4.2] - def self.up say_with_time "Salting user passwords, this may take some time..." do User.salt_unsalted_passwords! diff --git a/db/migrate/20131215104612_store_relation_type_in_journal_details.rb b/db/migrate/20131215104612_store_relation_type_in_journal_details.rb index c1990e67d..b07fd8bad 100644 --- a/db/migrate/20131215104612_store_relation_type_in_journal_details.rb +++ b/db/migrate/20131215104612_store_relation_type_in_journal_details.rb @@ -1,5 +1,4 @@ class StoreRelationTypeInJournalDetails < ActiveRecord::Migration[4.2] - MAPPING = { "label_relates_to" => "relates", "label_duplicates" => "duplicates", diff --git a/db/migrate/20180923082945_change_sqlite_booleans_to_0_and_1.rb b/db/migrate/20180923082945_change_sqlite_booleans_to_0_and_1.rb index 769ea7a51..d8c27d6aa 100644 --- a/db/migrate/20180923082945_change_sqlite_booleans_to_0_and_1.rb +++ b/db/migrate/20180923082945_change_sqlite_booleans_to_0_and_1.rb @@ -1,5 +1,4 @@ class ChangeSqliteBooleansTo0And1 < ActiveRecord::Migration[5.2] - COLUMNS = { AuthSource => ['onthefly_register', 'tls'], CustomFieldEnumeration => ['active'], diff --git a/lib/redmine/notifiable.rb b/lib/redmine/notifiable.rb index 05400b7ad..95d26609d 100644 --- a/lib/redmine/notifiable.rb +++ b/lib/redmine/notifiable.rb @@ -19,7 +19,6 @@ module Redmine class Notifiable < Struct.new(:name, :parent) - def to_s name end diff --git a/lib/redmine/scm/adapters/cvs_adapter.rb b/lib/redmine/scm/adapters/cvs_adapter.rb index 439adcbeb..2f157d10b 100644 --- a/lib/redmine/scm/adapters/cvs_adapter.rb +++ b/lib/redmine/scm/adapters/cvs_adapter.rb @@ -23,7 +23,6 @@ module Redmine module Scm module Adapters class CvsAdapter < AbstractAdapter - # CVS executable name CVS_BIN = Redmine::Configuration['scm_cvs_command'] || "cvs" diff --git a/lib/redmine/scm/adapters/filesystem_adapter.rb b/lib/redmine/scm/adapters/filesystem_adapter.rb index 71409c545..ac28436e8 100644 --- a/lib/redmine/scm/adapters/filesystem_adapter.rb +++ b/lib/redmine/scm/adapters/filesystem_adapter.rb @@ -26,7 +26,6 @@ module Redmine module Scm module Adapters class FilesystemAdapter < AbstractAdapter - class << self def client_available true diff --git a/lib/redmine/wiki_formatting/html_parser.rb b/lib/redmine/wiki_formatting/html_parser.rb index 8db5fe4d8..ff40cbb6b 100644 --- a/lib/redmine/wiki_formatting/html_parser.rb +++ b/lib/redmine/wiki_formatting/html_parser.rb @@ -22,7 +22,6 @@ require 'loofah/helpers' module Redmine module WikiFormatting class HtmlParser - class_attribute :tags self.tags = { 'br' => {:post => "\n"}, diff --git a/lib/redmine/wiki_formatting/markdown/html_parser.rb b/lib/redmine/wiki_formatting/markdown/html_parser.rb index 4e2217926..6e16126d9 100644 --- a/lib/redmine/wiki_formatting/markdown/html_parser.rb +++ b/lib/redmine/wiki_formatting/markdown/html_parser.rb @@ -21,7 +21,6 @@ module Redmine module WikiFormatting module Markdown class HtmlParser < Redmine::WikiFormatting::HtmlParser - self.tags = tags.merge( 'b' => {:pre => '**', :post => '**'}, 'strong' => {:pre => '**', :post => '**'}, diff --git a/lib/redmine/wiki_formatting/textile/html_parser.rb b/lib/redmine/wiki_formatting/textile/html_parser.rb index 531fcd4b7..fdda5b6ad 100644 --- a/lib/redmine/wiki_formatting/textile/html_parser.rb +++ b/lib/redmine/wiki_formatting/textile/html_parser.rb @@ -21,7 +21,6 @@ module Redmine module WikiFormatting module Textile class HtmlParser < Redmine::WikiFormatting::HtmlParser - self.tags = tags.merge( 'b' => {:pre => '*', :post => '*'}, 'strong' => {:pre => '*', :post => '*'}, diff --git a/test/integration/api_test/api_routing_test.rb b/test/integration/api_test/api_routing_test.rb index d5e19f06c..9ba547275 100644 --- a/test/integration/api_test/api_routing_test.rb +++ b/test/integration/api_test/api_routing_test.rb @@ -20,7 +20,6 @@ require_relative '../../test_helper' class Redmine::ApiTest::ApiRoutingTest < Redmine::ApiTest::Routing - def test_attachments should_route 'GET /attachments/1' => 'attachments#show', :id => '1' should_route 'PATCH /attachments/1' => 'attachments#update', :id => '1' diff --git a/test/integration/lib/redmine/themes_test.rb b/test/integration/lib/redmine/themes_test.rb index c5eaee65d..f5fbc89b6 100644 --- a/test/integration/lib/redmine/themes_test.rb +++ b/test/integration/lib/redmine/themes_test.rb @@ -20,7 +20,6 @@ require_relative '../../../test_helper' class ThemesTest < Redmine::IntegrationTest - def setup Redmine::Themes.rescan @theme = Redmine::Themes.theme('classic') diff --git a/test/integration/routing/activities_test.rb b/test/integration/routing/activities_test.rb index 1a89e13cb..742e80455 100644 --- a/test/integration/routing/activities_test.rb +++ b/test/integration/routing/activities_test.rb @@ -20,7 +20,6 @@ require_relative '../../test_helper' class RoutingActivitiesTest < Redmine::RoutingTest - def test_activity should_route 'GET /activity' => 'activities#index' should_route 'GET /activity.atom' => 'activities#index', :format => 'atom' diff --git a/test/integration/routing/repositories_test.rb b/test/integration/routing/repositories_test.rb index 466b140bf..6bfbedb70 100644 --- a/test/integration/routing/repositories_test.rb +++ b/test/integration/routing/repositories_test.rb @@ -20,7 +20,6 @@ require_relative '../../test_helper' class RoutingRepositoriesTest < Redmine::RoutingTest - def setup @paths = ['path/to/index.html', 'path/to/file.c', 'path/to/file.yaml', 'path/to/file.txt', diff --git a/test/unit/lib/redmine/field_format/link_format_test.rb b/test/unit/lib/redmine/field_format/link_format_test.rb index 513462101..af612e5a0 100644 --- a/test/unit/lib/redmine/field_format/link_format_test.rb +++ b/test/unit/lib/redmine/field_format/link_format_test.rb @@ -21,7 +21,6 @@ require_relative '../../../../test_helper' require 'redmine/field_format' class Redmine::LinkFieldFormatTest < ActionView::TestCase - def setup User.current = nil end |