diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index ae394a82..43a2b97a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by -# `rubocop --auto-gen-config --exclude-limit 200` -# on 2023-10-11 12:02:42 UTC using RuboCop version 1.57.0. +# `rubocop --auto-gen-config` +# on 2023-11-15 10:28:31 UTC using RuboCop version 1.57.2. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -14,7 +14,7 @@ Gemspec/DeprecatedAttributeAssignment: Exclude: - 'apipie-rails.gemspec' -# Offense count: 11 +# Offense count: 12 # Configuration parameters: EnforcedStyle, AllowedGems, Include. # SupportedStyles: Gemfile, gems.rb, gemspec # Include: **/*.gemspec, **/Gemfile, **/gems.rb @@ -157,24 +157,7 @@ Layout/EmptyLineBetweenDefs: # Offense count: 56 # This cop supports safe autocorrection (--autocorrect). Layout/EmptyLines: - Exclude: - - 'app/controllers/apipie/apipies_controller.rb' - - 'lib/apipie/apipie_module.rb' - - 'lib/apipie/dsl_definition.rb' - - 'lib/apipie/extractor/writer.rb' - - 'lib/apipie/response_description.rb' - - 'lib/apipie/response_description_adapter.rb' - - 'lib/apipie/rspec/response_validation_helper.rb' - - 'lib/apipie/validator.rb' - - 'lib/tasks/apipie.rake' - - 'spec/controllers/included_param_group_controller_spec.rb' - - 'spec/dummy/app/controllers/pets_controller.rb' - - 'spec/dummy/app/controllers/pets_using_auto_views_controller.rb' - - 'spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb' - - 'spec/lib/apipie/apipies_controller_spec.rb' - - 'spec/lib/apipie/application_spec.rb' - - 'spec/lib/swagger/rake_swagger_spec.rb' - - 'spec/lib/swagger/swagger_dsl_spec.rb' + Enabled: false # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). @@ -197,61 +180,14 @@ Layout/EmptyLinesAroundAttributeAccessor: # Configuration parameters: EnforcedStyle. # SupportedStyles: empty_lines, no_empty_lines Layout/EmptyLinesAroundBlockBody: - Exclude: - - 'app/controllers/apipie/apipies_controller.rb' - - 'lib/tasks/apipie.rake' - - 'spec/controllers/api/v1/architectures_controller_spec.rb' - - 'spec/controllers/concerns_controller_spec.rb' - - 'spec/controllers/extended_controller_spec.rb' - - 'spec/controllers/included_param_group_controller_spec.rb' - - 'spec/controllers/pets_controller_spec.rb' - - 'spec/controllers/users_controller_spec.rb' - - 'spec/dummy/app/controllers/pets_controller.rb' - - 'spec/dummy/config/routes.rb' - - 'spec/lib/apipie/apipies_controller_spec.rb' - - 'spec/lib/apipie/application_spec.rb' - - 'spec/lib/apipie/extractor/writer_spec.rb' - - 'spec/lib/apipie/file_handler_spec.rb' - - 'spec/lib/apipie/generator/swagger/param_description/composite_spec.rb' - - 'spec/lib/apipie/generator/swagger/param_description/type_spec.rb' - - 'spec/lib/apipie/param_description_spec.rb' - - 'spec/lib/apipie/param_group_spec.rb' - - 'spec/lib/apipie/validator_spec.rb' - - 'spec/lib/rake_spec.rb' - - 'spec/lib/swagger/rake_swagger_spec.rb' - - 'spec/lib/swagger/swagger_dsl_spec.rb' - - 'spec/lib/validators/array_validator_spec.rb' - - 'spec/spec_helper.rb' - - 'spec/test_engine/memes_controller_spec.rb' + Enabled: false # Offense count: 44 # 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: - - 'lib/apipie/application.rb' - - 'lib/apipie/error_description.rb' - - 'lib/apipie/extractor.rb' - - 'lib/apipie/extractor/collector.rb' - - 'lib/apipie/extractor/writer.rb' - - 'lib/apipie/markup.rb' - - 'lib/apipie/param_description.rb' - - 'lib/apipie/resource_description.rb' - - 'lib/apipie/response_description.rb' - - 'lib/apipie/response_description_adapter.rb' - - 'lib/apipie/see_description.rb' - - 'lib/apipie/tag_list_description.rb' - - 'lib/apipie/validator.rb' - - 'spec/dummy/app/controllers/application_controller.rb' - - 'spec/dummy/app/controllers/concerns_controller.rb' - - 'spec/dummy/app/controllers/extended_controller.rb' - - 'spec/dummy/app/controllers/included_param_group_controller.rb' - - 'spec/dummy/app/controllers/overridden_concerns_controller.rb' - - 'spec/dummy/app/controllers/pets_controller.rb' - - 'spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb' - - 'spec/dummy/app/controllers/users_controller.rb' - - 'spec/dummy/config/initializers/apipie.rb' + Enabled: false # Offense count: 6 # This cop supports safe autocorrection (--autocorrect). @@ -457,27 +393,7 @@ Layout/SpaceAfterColon: # Offense count: 42 # This cop supports safe autocorrection (--autocorrect). Layout/SpaceAfterComma: - Exclude: - - 'apipie-rails.gemspec' - - 'lib/apipie/application.rb' - - 'lib/apipie/dsl_definition.rb' - - 'lib/apipie/extractor.rb' - - 'lib/apipie/extractor/collector.rb' - - 'lib/apipie/extractor/recorder.rb' - - 'lib/apipie/extractor/writer.rb' - - 'lib/apipie/helpers.rb' - - 'lib/apipie/method_description.rb' - - 'lib/apipie/param_description.rb' - - 'lib/apipie/static_dispatcher.rb' - - 'lib/tasks/apipie.rake' - - 'spec/controllers/users_controller_spec.rb' - - 'spec/dummy/app/controllers/pets_controller.rb' - - 'spec/dummy/config/initializers/apipie.rb' - - 'spec/lib/apipie/apipies_controller_spec.rb' - - 'spec/lib/apipie/application_spec.rb' - - 'spec/lib/apipie/param_description_spec.rb' - - 'spec/lib/swagger/rake_swagger_spec.rb' - - 'spec/lib/swagger/swagger_dsl_spec.rb' + Enabled: false # Offense count: 4 # This cop supports safe autocorrection (--autocorrect). @@ -546,23 +462,7 @@ Layout/SpaceInsideArrayLiteralBrackets: # SupportedStyles: space, no_space # SupportedStylesForEmptyBraces: space, no_space Layout/SpaceInsideBlockBraces: - Exclude: - - 'lib/apipie/dsl_definition.rb' - - 'lib/apipie/extractor/writer.rb' - - 'lib/apipie/param_description.rb' - - 'lib/apipie/response_description.rb' - - 'lib/apipie/routes_formatter.rb' - - 'lib/apipie/validator.rb' - - 'lib/tasks/apipie.rake' - - 'spec/controllers/users_controller_spec.rb' - - 'spec/dummy/app/controllers/pets_using_auto_views_controller.rb' - - 'spec/lib/apipie/application_spec.rb' - - 'spec/lib/apipie/generator/swagger/operation_id_spec.rb' - - 'spec/lib/apipie/generator/swagger/warning_spec.rb' - - 'spec/lib/swagger/rake_swagger_spec.rb' - - 'spec/lib/swagger/swagger_dsl_spec.rb' - - 'spec/spec_helper.rb' - - 'spec/support/rake.rb' + Enabled: false # Offense count: 206 # This cop supports safe autocorrection (--autocorrect). @@ -1398,45 +1298,7 @@ Style/CaseEquality: # Configuration parameters: EnforcedStyle. # SupportedStyles: nested, compact Style/ClassAndModuleChildren: - Exclude: - - 'lib/apipie/core_ext/route.rb' - - 'lib/apipie/extractor.rb' - - 'lib/apipie/generator/generator.rb' - - 'lib/apipie/generator/swagger/computed_interface_id.rb' - - 'lib/apipie/generator/swagger/context.rb' - - 'lib/apipie/generator/swagger/method_description.rb' - - 'lib/apipie/generator/swagger/method_description/api_decorator.rb' - - 'lib/apipie/generator/swagger/method_description/api_schema_service.rb' - - 'lib/apipie/generator/swagger/method_description/decorator.rb' - - 'lib/apipie/generator/swagger/method_description/parameters_service.rb' - - 'lib/apipie/generator/swagger/method_description/response_schema_service.rb' - - 'lib/apipie/generator/swagger/method_description/response_service.rb' - - 'lib/apipie/generator/swagger/operation_id.rb' - - 'lib/apipie/generator/swagger/param_description.rb' - - 'lib/apipie/generator/swagger/param_description/builder.rb' - - 'lib/apipie/generator/swagger/param_description/composite.rb' - - 'lib/apipie/generator/swagger/param_description/description.rb' - - 'lib/apipie/generator/swagger/param_description/in.rb' - - 'lib/apipie/generator/swagger/param_description/name.rb' - - 'lib/apipie/generator/swagger/param_description/path_params_composite.rb' - - 'lib/apipie/generator/swagger/param_description/referenced_composite.rb' - - 'lib/apipie/generator/swagger/param_description/type.rb' - - 'lib/apipie/generator/swagger/path_decorator.rb' - - 'lib/apipie/generator/swagger/referenced_definitions.rb' - - 'lib/apipie/generator/swagger/resource_description_collection.rb' - - 'lib/apipie/generator/swagger/resource_description_composite.rb' - - 'lib/apipie/generator/swagger/schema.rb' - - 'lib/apipie/generator/swagger/swagger.rb' - - 'lib/apipie/generator/swagger/type.rb' - - 'lib/apipie/generator/swagger/type_extractor.rb' - - 'lib/apipie/generator/swagger/warning.rb' - - 'lib/apipie/generator/swagger/warning_writer.rb' - - 'lib/apipie/method_description/api.rb' - - 'lib/apipie/method_description/apis_service.rb' - - 'lib/apipie/rspec/response_validation_helper.rb' - - 'spec/dummy/app/controllers/api/v2/nested/resources_controller.rb' - - 'spec/dummy/config/initializers/apipie.rb' - - 'spec/lib/validators/array_validator_spec.rb' + Enabled: false # Offense count: 4 # This cop supports safe autocorrection (--autocorrect). @@ -1926,84 +1788,7 @@ Style/StringConcatenation: # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. # SupportedStyles: single_quotes, double_quotes Style/StringLiterals: - Exclude: - - 'Rakefile' - - 'apipie-rails.gemspec' - - 'app/controllers/apipie/apipies_controller.rb' - - 'lib/apipie-rails.rb' - - 'lib/apipie/apipie_module.rb' - - 'lib/apipie/application.rb' - - 'lib/apipie/configuration.rb' - - 'lib/apipie/dsl_definition.rb' - - 'lib/apipie/extractor.rb' - - 'lib/apipie/extractor/collector.rb' - - 'lib/apipie/extractor/recorder.rb' - - 'lib/apipie/extractor/writer.rb' - - 'lib/apipie/generator/swagger/param_description.rb' - - 'lib/apipie/generator/swagger/param_description/composite.rb' - - 'lib/apipie/generator/swagger/warning.rb' - - 'lib/apipie/helpers.rb' - - 'lib/apipie/method_description.rb' - - 'lib/apipie/param_description.rb' - - 'lib/apipie/resource_description.rb' - - 'lib/apipie/routing.rb' - - 'lib/apipie/rspec/response_validation_helper.rb' - - 'lib/apipie/see_description.rb' - - 'lib/apipie/static_dispatcher.rb' - - 'lib/apipie/validator.rb' - - 'lib/apipie/version.rb' - - 'lib/generators/apipie/install/install_generator.rb' - - 'lib/tasks/apipie.rake' - - 'spec/controllers/api/v1/architectures_controller_spec.rb' - - 'spec/controllers/api/v2/architectures_controller_spec.rb' - - 'spec/controllers/api/v2/nested/resources_controller_spec.rb' - - 'spec/controllers/concerns_controller_spec.rb' - - 'spec/controllers/extended_controller_spec.rb' - - 'spec/controllers/included_param_group_controller_spec.rb' - - 'spec/controllers/pets_controller_spec.rb' - - 'spec/controllers/users_controller_spec.rb' - - 'spec/dummy/app/controllers/api/v1/architectures_controller.rb' - - 'spec/dummy/app/controllers/api/v2/architectures_controller.rb' - - 'spec/dummy/app/controllers/api/v2/nested/architectures_controller.rb' - - 'spec/dummy/app/controllers/api/v2/nested/resources_controller.rb' - - 'spec/dummy/app/controllers/application_controller.rb' - - 'spec/dummy/app/controllers/overridden_concerns_controller.rb' - - 'spec/dummy/app/controllers/pets_controller.rb' - - 'spec/dummy/app/controllers/pets_using_auto_views_controller.rb' - - 'spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb' - - 'spec/dummy/app/controllers/sample_controller.rb' - - 'spec/dummy/app/controllers/tagged_cats_controller.rb' - - 'spec/dummy/app/controllers/tagged_dogs_controller.rb' - - 'spec/dummy/app/controllers/twitter_example_controller.rb' - - 'spec/dummy/app/controllers/users_controller.rb' - - 'spec/dummy/components/test_engine/Gemfile' - - 'spec/dummy/config/application.rb' - - 'spec/dummy/config/initializers/apipie.rb' - - 'spec/dummy/config/routes.rb' - - 'spec/lib/apipie/apipies_controller_spec.rb' - - 'spec/lib/apipie/application_spec.rb' - - 'spec/lib/apipie/extractor/recorder/middleware_spec.rb' - - 'spec/lib/apipie/extractor/writer_spec.rb' - - 'spec/lib/apipie/extractor_spec.rb' - - 'spec/lib/apipie/file_handler_spec.rb' - - 'spec/lib/apipie/generator/swagger/operation_id_spec.rb' - - 'spec/lib/apipie/generator/swagger/param_description/composite_spec.rb' - - 'spec/lib/apipie/generator/swagger/type_extractor_spec.rb' - - 'spec/lib/apipie/generator/swagger/warning_spec.rb' - - 'spec/lib/apipie/method_description_spec.rb' - - 'spec/lib/apipie/param_description/deprecation_spec.rb' - - 'spec/lib/apipie/param_description_spec.rb' - - 'spec/lib/apipie/param_group_spec.rb' - - 'spec/lib/apipie/resource_description_spec.rb' - - 'spec/lib/apipie/validator_spec.rb' - - 'spec/lib/rake_spec.rb' - - 'spec/lib/swagger/rake_swagger_spec.rb' - - 'spec/lib/swagger/swagger_dsl_spec.rb' - - 'spec/lib/validators/array_validator_spec.rb' - - 'spec/spec_helper.rb' - - 'spec/support/custom_bool_validator.rb' - - 'spec/support/rake.rb' - - 'spec/test_engine/memes_controller_spec.rb' + Enabled: false # Offense count: 34 # This cop supports safe autocorrection (--autocorrect). diff --git a/apipie-rails.gemspec b/apipie-rails.gemspec index ef3d6a64..d356a461 100644 --- a/apipie-rails.gemspec +++ b/apipie-rails.gemspec @@ -28,6 +28,7 @@ Gem::Specification.new do |s| s.add_development_dependency "json-schema", "~> 2.8" s.add_development_dependency "rspec-rails", "~> 3.0" s.add_development_dependency "rake" + s.add_development_dependency 'rubocop', '1.57.2' if RUBY_VERSION > '2.7' s.add_development_dependency 'rubocop_challenger' s.add_development_dependency 'rubocop-rails' s.add_development_dependency 'rubocop-rspec'