diff --git a/.rubocop.yml b/.rubocop.yml index 0bd444396..bfacad661 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -20,6 +20,7 @@ Layout/LineLength: - lib/apipie/response_description_adapter.rb - lib/apipie/swagger_generator.rb - lib/apipie/errors.rb + - lib/apipie/generator/swagger/warning.rb - lib/apipie/rspec/response_validation_helper.rb - spec/controllers/users_controller_spec.rb - spec/dummy/app/controllers/twitter_example_controller.rb @@ -29,9 +30,83 @@ Layout/LineLength: - spec/lib/swagger/response_validation_spec.rb - spec/spec_helper.rb +Metrics/ClassLength: + Max: 180 + Exclude: + - lib/apipie/extractor/writer.rb + - lib/apipie/application.rb + - lib/apipie/param_description.rb + - lib/apipie/swagger_generator.rb + - spec/dummy/app/controllers/pets_controller.rb + - spec/dummy/app/controllers/twitter_example_controller.rb + - spec/dummy/app/controllers/users_controller.rb + +Metrics/BlockLength: + Max: 25 # default + Exclude: + - app/controllers/apipie/apipies_controller.rb + - lib/apipie/generator/swagger/param_description/composite.rb + - lib/tasks/apipie.rake + - lib/apipie/swagger_generator.rb + Naming/PredicateName: AllowedMethods: - have_field? Style/NumericPredicate: Enabled: false + +Style/HashSyntax: + EnforcedStyle: no_mixed_keys + EnforcedShorthandSyntax: never # consistent + +Style/Documentation: + Exclude: + - 'app/controllers/apipie/apipies_controller.rb' + - 'app/helpers/apipie_helper.rb' + - 'lib/apipie/apipie_module.rb' + - 'lib/apipie/application.rb' + - 'lib/apipie/configuration.rb' + - 'lib/apipie/core_ext/route.rb' + - 'lib/apipie/dsl_definition.rb' + - 'lib/apipie/error_description.rb' + - 'lib/apipie/errors.rb' + - 'lib/apipie/extractor.rb' + - 'lib/apipie/extractor/collector.rb' + - 'lib/apipie/extractor/recorder.rb' + - 'lib/apipie/extractor/writer.rb' + - 'lib/apipie/generator/generator.rb' + - 'lib/apipie/generator/swagger/context.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/type.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/helpers.rb' + - 'lib/apipie/markup.rb' + - 'lib/apipie/method_description.rb' + - 'lib/apipie/method_description/api.rb' + - 'lib/apipie/middleware/checksum_in_headers.rb' + - 'lib/apipie/railtie.rb' + - 'lib/apipie/response_description.rb' + - 'lib/apipie/response_description_adapter.rb' + - 'lib/apipie/routes_formatter.rb' + - 'lib/apipie/routing.rb' + - 'lib/apipie/rspec/response_validation_helper.rb' + - 'lib/apipie/see_description.rb' + - 'lib/apipie/static_dispatcher.rb' + - 'lib/apipie/tag_list_description.rb' + - 'lib/apipie/validator.rb' + - 'lib/generators/apipie/install/install_generator.rb' + - 'lib/generators/apipie/views_generator.rb' + - spec/support/custom_bool_validator.rb + - spec/lib/validators/array_validator_spec.rb + - spec/dummy/**/*.rb diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 428c4e85b..c4c624617 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by -# `rubocop --auto-gen-config` -# on 2022-09-30 23:40:43 UTC using RuboCop version 1.36.0. +# `rubocop --auto-gen-config --exclude-limit 200` +# on 2023-01-23 11:25:29 UTC using RuboCop version 1.44.0. # 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 @@ -8,12 +8,21 @@ # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: Include. +# Configuration parameters: Severity, Include. # Include: **/*.gemspec Gemspec/DeprecatedAttributeAssignment: Exclude: - 'apipie-rails.gemspec' +# Offense count: 6 +# Configuration parameters: EnforcedStyle, AllowedGems, Include. +# SupportedStyles: Gemfile, gems.rb, gemspec +# AllowedGems: bundler +# Include: **/*.gemspec, **/Gemfile, **/gems.rb +Gemspec/DevelopmentDependencies: + Exclude: + - 'apipie-rails.gemspec' + # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include. @@ -24,27 +33,29 @@ Gemspec/OrderedDependencies: # Offense count: 2 # This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: Include. +# Configuration parameters: Severity, Include. # Include: **/*.gemspec Gemspec/RequireMFA: Exclude: - 'apipie-rails.gemspec' - 'spec/dummy/components/test_engine/test_engine.gemspec' -# Offense count: 1 -# Configuration parameters: Include. +# Offense count: 2 +# Configuration parameters: Severity, Include. # Include: **/*.gemspec Gemspec/RequiredRubyVersion: Exclude: + - 'apipie-rails.gemspec' - 'spec/dummy/components/test_engine/test_engine.gemspec' -# Offense count: 26 +# Offense count: 27 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, IndentationWidth. # SupportedStyles: with_first_argument, with_fixed_indentation Layout/ArgumentAlignment: Exclude: - 'lib/apipie/configuration.rb' + - 'lib/apipie/method_description/api.rb' - 'lib/apipie/resource_description.rb' - 'spec/controllers/users_controller_spec.rb' - 'spec/dummy/app/controllers/twitter_example_controller.rb' @@ -78,14 +89,28 @@ Layout/CommentIndentation: - 'lib/apipie/swagger_generator.rb' - 'spec/dummy/app/controllers/pets_controller.rb' -# Offense count: 6 +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyleAlignWith, Severity. +# SupportedStylesAlignWith: start_of_line, def +Layout/DefEndAlignment: + Exclude: + - 'lib/apipie/generator/swagger/param_description/name.rb' + +# Offense count: 36 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: leading, trailing Layout/DotPosition: Exclude: + - 'lib/apipie/generator/swagger/param_description/builder.rb' + - 'lib/apipie/generator/swagger/param_description/composite.rb' + - 'lib/apipie/generator/swagger/param_description/type.rb' - 'lib/apipie/method_description.rb' + - 'lib/apipie/swagger_generator.rb' - 'spec/lib/application_spec.rb' + - 'spec/lib/generator/swagger/operation_id_spec.rb' + - 'spec/lib/generator/swagger/param_description/type_spec.rb' # Offense count: 7 # This cop supports safe autocorrection (--autocorrect). @@ -98,10 +123,26 @@ Layout/ElseAlignment: - 'lib/apipie/param_description.rb' - 'lib/apipie/resource_description.rb' -# Offense count: 65 +# Offense count: 64 # This cop supports safe autocorrection (--autocorrect). Layout/EmptyLineAfterGuardClause: - Enabled: false + Exclude: + - 'app/controllers/apipie/apipies_controller.rb' + - 'lib/apipie/application.rb' + - 'lib/apipie/dsl_definition.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/response_description_adapter.rb' + - 'lib/apipie/see_description.rb' + - 'lib/apipie/swagger_generator.rb' + - 'lib/apipie/validator.rb' + - 'lib/tasks/apipie.rake' + - 'spec/dummy/config/initializers/apipie.rb' + - 'spec/lib/swagger/swagger_dsl_spec.rb' + - 'spec/spec_helper.rb' # Offense count: 3 # This cop supports safe autocorrection (--autocorrect). @@ -111,7 +152,7 @@ Layout/EmptyLineAfterMagicComment: - 'lib/apipie/validator.rb' - 'lib/tasks/apipie.rake' -# Offense count: 20 +# Offense count: 17 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, AllowAdjacentOneLineDefs, NumberOfEmptyLines. Layout/EmptyLineBetweenDefs: @@ -128,10 +169,31 @@ Layout/EmptyLineBetweenDefs: - 'spec/dummy/app/controllers/pets_using_auto_views_controller.rb' - 'spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb' -# Offense count: 83 +# Offense count: 74 # This cop supports safe autocorrection (--autocorrect). Layout/EmptyLines: - Enabled: false + 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/swagger_generator.rb' + - 'lib/apipie/validator.rb' + - 'lib/tasks/apipie.rake' + - 'spec/controllers/apipies_controller_spec.rb' + - '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/application_spec.rb' + - 'spec/lib/method_description_spec.rb' + - 'spec/lib/param_description_spec.rb' + - 'spec/lib/swagger/rake_swagger_spec.rb' + - 'spec/lib/swagger/response_validation_spec.rb' + - 'spec/lib/swagger/swagger_dsl_spec.rb' # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). @@ -141,28 +203,79 @@ Layout/EmptyLinesAroundAccessModifier: Exclude: - 'app/controllers/apipie/apipies_controller.rb' -# Offense count: 6 +# Offense count: 5 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowAliasSyntax, AllowedMethods. # AllowedMethods: alias_method, public, protected, private Layout/EmptyLinesAroundAttributeAccessor: Exclude: - 'lib/apipie/configuration.rb' - - 'lib/apipie/swagger_generator.rb' -# Offense count: 106 +# Offense count: 107 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: empty_lines, no_empty_lines Layout/EmptyLinesAroundBlockBody: - Enabled: false + Exclude: + - 'app/controllers/apipie/apipies_controller.rb' + - 'lib/tasks/apipie.rake' + - 'spec/controllers/api/v1/architectures_controller_spec.rb' + - 'spec/controllers/api/v2/architectures_controller_spec.rb' + - 'spec/controllers/apipies_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/memes_controller_spec.rb' + - 'spec/controllers/users_controller_spec.rb' + - 'spec/dummy/app/controllers/pets_controller.rb' + - 'spec/dummy/config/routes.rb' + - 'spec/lib/application_spec.rb' + - 'spec/lib/extractor/writer_spec.rb' + - 'spec/lib/file_handler_spec.rb' + - 'spec/lib/generator/swagger/param_description/composite_spec.rb' + - 'spec/lib/generator/swagger/param_description/type_spec.rb' + - 'spec/lib/method_description_spec.rb' + - 'spec/lib/param_description_spec.rb' + - 'spec/lib/param_group_spec.rb' + - 'spec/lib/rake_spec.rb' + - 'spec/lib/resource_description_spec.rb' + - 'spec/lib/swagger/rake_swagger_spec.rb' + - 'spec/lib/swagger/response_validation_spec.rb' + - 'spec/lib/swagger/swagger_dsl_spec.rb' + - 'spec/lib/validator_spec.rb' + - 'spec/lib/validators/array_validator_spec.rb' + - 'spec/spec_helper.rb' -# Offense count: 51 +# Offense count: 47 # 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: - Enabled: false + Exclude: + - 'lib/apipie/application.rb' + - 'lib/apipie/configuration.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/swagger_generator.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' # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). @@ -188,7 +301,24 @@ Layout/EmptyLinesAroundMethodBody: # Configuration parameters: EnforcedStyle. # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines Layout/EmptyLinesAroundModuleBody: - Enabled: false + Exclude: + - 'app/helpers/apipie_helper.rb' + - 'lib/apipie/application.rb' + - 'lib/apipie/dsl_definition.rb' + - 'lib/apipie/error_description.rb' + - 'lib/apipie/errors.rb' + - 'lib/apipie/extractor.rb' + - 'lib/apipie/markup.rb' + - 'lib/apipie/method_description.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/static_dispatcher.rb' + - 'lib/apipie/swagger_generator.rb' + - 'lib/apipie/tag_list_description.rb' + - 'lib/apipie/validator.rb' # Offense count: 7 # This cop supports safe autocorrection (--autocorrect). @@ -204,19 +334,19 @@ Layout/EndAlignment: - 'lib/apipie/param_description.rb' - 'lib/apipie/resource_description.rb' -# Offense count: 32 +# Offense count: 29 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment. Layout/ExtraSpacing: Exclude: - 'lib/apipie/configuration.rb' - 'lib/apipie/dsl_definition.rb' - - 'lib/apipie/swagger_generator.rb' - 'spec/controllers/users_controller_spec.rb' - 'spec/dummy/app/controllers/pets_controller.rb' - 'spec/dummy/config.ru' - 'spec/dummy/config/environments/test.rb' - 'spec/dummy/script/rails' + - 'spec/lib/generator/swagger/param_description/type_spec.rb' - 'spec/lib/swagger/swagger_dsl_spec.rb' # Offense count: 9 @@ -228,7 +358,7 @@ Layout/FirstArrayElementIndentation: - 'spec/dummy/app/controllers/pets_controller.rb' - 'spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb' -# Offense count: 36 +# Offense count: 45 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, IndentationWidth. # SupportedStyles: special_inside_parentheses, consistent, align_braces @@ -241,6 +371,13 @@ Layout/FirstHashElementIndentation: - 'lib/apipie/swagger_generator.rb' - 'spec/dummy/app/controllers/pets_controller.rb' - 'spec/lib/extractor/writer_spec.rb' + - 'spec/lib/generator/swagger/operation_id_spec.rb' + - 'spec/lib/generator/swagger/param_description/builder_spec.rb' + - 'spec/lib/generator/swagger/param_description/description_spec.rb' + - 'spec/lib/generator/swagger/param_description/in_spec.rb' + - 'spec/lib/generator/swagger/param_description/name_spec.rb' + - 'spec/lib/generator/swagger/param_description/type_spec.rb' + - 'spec/lib/method_description/apis_service_spec.rb' # Offense count: 117 # This cop supports safe autocorrection (--autocorrect). @@ -263,15 +400,16 @@ Layout/HeredocIndentation: - 'lib/tasks/apipie.rake' - 'spec/controllers/users_controller_spec.rb' -# Offense count: 1 +# Offense count: 2 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: normal, indented_internal_methods Layout/IndentationConsistency: Exclude: + - 'lib/apipie/generator/swagger/param_description/name.rb' - 'spec/lib/param_group_spec.rb' -# Offense count: 8 +# Offense count: 10 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: Width, AllowedPatterns, IgnoredPatterns. Layout/IndentationWidth: @@ -280,6 +418,7 @@ Layout/IndentationWidth: - 'lib/apipie/apipie_module.rb' - 'lib/apipie/application.rb' - 'lib/apipie/extractor/writer.rb' + - 'lib/apipie/generator/swagger/param_description/name.rb' - 'lib/apipie/method_description.rb' - 'lib/apipie/param_description.rb' - 'lib/apipie/resource_description.rb' @@ -327,13 +466,25 @@ Layout/MultilineMethodCallBraceLayout: Exclude: - 'lib/tasks/apipie.rake' -# Offense count: 4 +# Offense count: 22 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: aligned, indented, indented_relative_to_receiver +Layout/MultilineMethodCallIndentation: + Exclude: + - 'lib/apipie/generator/swagger/param_description/builder.rb' + - 'lib/apipie/generator/swagger/param_description/composite.rb' + - 'lib/apipie/generator/swagger/param_description/type.rb' + - 'lib/apipie/swagger_generator.rb' + +# Offense count: 5 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, IndentationWidth. # SupportedStyles: aligned, indented Layout/MultilineOperationIndentation: Exclude: - 'lib/apipie/application.rb' + - 'lib/apipie/generator/swagger/param_description/composite.rb' - 'lib/apipie/param_description.rb' - 'lib/tasks/apipie.rake' @@ -343,10 +494,33 @@ Layout/SpaceAfterColon: Exclude: - 'spec/dummy/app/controllers/included_param_group_controller.rb' -# Offense count: 91 +# Offense count: 81 # This cop supports safe autocorrection (--autocorrect). Layout/SpaceAfterComma: - Enabled: false + 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/apipie/swagger_generator.rb' + - 'lib/tasks/apipie.rake' + - 'spec/controllers/apipies_controller_spec.rb' + - 'spec/controllers/users_controller_spec.rb' + - 'spec/dummy/app/controllers/pets_controller.rb' + - 'spec/dummy/app/controllers/twitter_example_controller.rb' + - 'spec/dummy/app/controllers/users_controller.rb' + - 'spec/dummy/config/initializers/apipie.rb' + - 'spec/lib/application_spec.rb' + - 'spec/lib/param_description_spec.rb' + - 'spec/lib/swagger/rake_swagger_spec.rb' + - 'spec/lib/swagger/swagger_dsl_spec.rb' # Offense count: 4 # This cop supports safe autocorrection (--autocorrect). @@ -357,7 +531,7 @@ Layout/SpaceAfterNot: - 'lib/apipie/extractor/collector.rb' - 'lib/apipie/extractor/writer.rb' -# Offense count: 37 +# Offense count: 35 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: space, no_space @@ -401,7 +575,7 @@ Layout/SpaceAroundOperators: - 'spec/lib/swagger/rake_swagger_spec.rb' - 'spec/lib/swagger/swagger_dsl_spec.rb' -# Offense count: 38 +# Offense count: 39 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces. # SupportedStyles: space, no_space @@ -428,7 +602,7 @@ Layout/SpaceBeforeComma: Exclude: - 'spec/controllers/users_controller_spec.rb' -# Offense count: 2 +# Offense count: 4 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets. # SupportedStyles: space, no_space, compact @@ -436,31 +610,70 @@ Layout/SpaceBeforeComma: Layout/SpaceInsideArrayLiteralBrackets: Exclude: - 'lib/apipie/extractor/writer.rb' + - 'lib/apipie/generator/swagger/param_description/composite.rb' - 'spec/controllers/users_controller_spec.rb' -# Offense count: 91 +# Offense count: 93 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters. # SupportedStyles: space, no_space # SupportedStylesForEmptyBraces: space, no_space Layout/SpaceInsideBlockBraces: - Enabled: false + 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/swagger_generator.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/application_spec.rb' + - 'spec/lib/generator/swagger/operation_id_spec.rb' + - 'spec/lib/generator/swagger/warning_spec.rb' + - 'spec/lib/method_description_spec.rb' + - 'spec/lib/resource_description_spec.rb' + - 'spec/lib/swagger/rake_swagger_spec.rb' + - 'spec/lib/swagger/swagger_dsl_spec.rb' + - 'spec/spec_helper.rb' + - 'spec/support/rake.rb' -# Offense count: 234 +# Offense count: 222 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces. # SupportedStyles: space, no_space, compact # SupportedStylesForEmptyBraces: space, no_space Layout/SpaceInsideHashLiteralBraces: - Enabled: false + Exclude: + - 'lib/apipie/dsl_definition.rb' + - 'lib/apipie/extractor.rb' + - 'lib/apipie/extractor/collector.rb' + - 'lib/apipie/extractor/recorder.rb' + - 'lib/apipie/response_description.rb' + - 'lib/apipie/see_description.rb' + - 'lib/apipie/swagger_generator.rb' + - 'lib/tasks/apipie.rake' + - 'spec/controllers/apipies_controller_spec.rb' + - 'spec/controllers/users_controller_spec.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/components/test_engine/app/controllers/test_engine/memes_controller.rb' + - 'spec/lib/extractor/middleware_spec.rb' + - 'spec/lib/method_description_spec.rb' + - 'spec/lib/swagger/swagger_dsl_spec.rb' -# Offense count: 3 +# Offense count: 5 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: space, compact, no_space Layout/SpaceInsideParens: Exclude: - 'lib/apipie/middleware/checksum_in_headers.rb' + - 'spec/lib/generator/swagger/param_description/builder_spec.rb' + - 'spec/lib/method_description/apis_service_spec.rb' - 'spec/lib/swagger/swagger_dsl_spec.rb' # Offense count: 1 @@ -471,7 +684,7 @@ Layout/SpaceInsideStringInterpolation: Exclude: - 'spec/lib/swagger/swagger_dsl_spec.rb' -# Offense count: 12 +# Offense count: 15 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: final_newline, final_blank_line @@ -479,6 +692,7 @@ Layout/TrailingEmptyLines: Exclude: - 'Rakefile' - 'lib/apipie/extractor/collector.rb' + - 'lib/apipie/method_description/apis_service.rb' - 'lib/apipie/rspec/response_validation_helper.rb' - 'spec/controllers/concerns_controller_spec.rb' - 'spec/dummy/app/controllers/included_param_group_controller.rb' @@ -488,6 +702,8 @@ Layout/TrailingEmptyLines: - 'spec/dummy/config/boot.rb' - 'spec/dummy/config/environments/development.rb' - 'spec/dummy/config/initializers/secret_token.rb' + - 'spec/lib/generator/swagger/operation_id_spec.rb' + - 'spec/lib/generator/swagger/param_description_spec.rb' - 'spec/lib/param_group_spec.rb' # Offense count: 18 @@ -502,6 +718,7 @@ Layout/TrailingWhitespace: - 'spec/lib/application_spec.rb' # Offense count: 10 +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowSafeAssignment. Lint/AssignmentInCondition: Exclude: @@ -521,21 +738,23 @@ Lint/ConstantDefinitionInBlock: - 'lib/apipie/rspec/response_validation_helper.rb' - 'spec/controllers/users_controller_spec.rb' -# Offense count: 5 -# This cop supports safe autocorrection (--autocorrect). -Lint/DeprecatedClassMethods: - Exclude: - - 'app/controllers/apipie/apipies_controller.rb' - - 'lib/apipie/extractor/writer.rb' - - 'spec/controllers/apipies_controller_spec.rb' - - 'spec/lib/extractor/writer_spec.rb' - # Offense count: 9 Lint/DuplicateMethods: Exclude: - 'lib/apipie/configuration.rb' - 'lib/apipie/method_description.rb' +# Offense count: 8 +# Configuration parameters: AllowComments, AllowEmptyLambdas. +Lint/EmptyBlock: + Exclude: + - 'spec/lib/generator/swagger/operation_id_spec.rb' + - 'spec/lib/generator/swagger/param_description/composite_spec.rb' + - 'spec/lib/generator/swagger/param_description/description_spec.rb' + - 'spec/lib/generator/swagger/param_description/name_spec.rb' + - 'spec/lib/generator/swagger/type_extractor_spec.rb' + - 'spec/lib/method_description/apis_service_spec.rb' + # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). Lint/IdentityComparison: @@ -549,11 +768,6 @@ Lint/MissingSuper: - 'lib/apipie/response_description_adapter.rb' - 'lib/apipie/validator.rb' -# Offense count: 1 -Lint/NestedMethodDefinition: - Exclude: - - 'lib/apipie/swagger_generator.rb' - # Offense count: 11 # This cop supports unsafe autocorrection (--autocorrect-all). Lint/NonAtomicFileOperation: @@ -562,17 +776,21 @@ Lint/NonAtomicFileOperation: - 'spec/lib/extractor/writer_spec.rb' # Offense count: 1 -# This cop supports unsafe autocorrection (--autocorrect-all). -Lint/NonDeterministicRequireOrder: +Lint/NonLocalExitFromIterator: Exclude: - - 'spec/spec_helper.rb' + - 'lib/apipie/generator/swagger/param_description/composite.rb' -# Offense count: 2 +# Offense count: 1 # This cop supports safe autocorrection (--autocorrect). Lint/ParenthesesAsGroupedExpression: Exclude: - 'lib/apipie/param_description.rb' - - 'lib/apipie/swagger_generator.rb' + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +Lint/RedundantDirGlobSort: + Exclude: + - 'lib/apipie/application.rb' # Offense count: 2 # This cop supports safe autocorrection (--autocorrect). @@ -595,11 +813,10 @@ Lint/ShadowingOuterLocalVariable: - 'lib/apipie/extractor/writer.rb' - 'lib/apipie/swagger_generator.rb' -# Offense count: 5 +# Offense count: 4 # This cop supports safe autocorrection (--autocorrect). Lint/ToJSON: Exclude: - - 'lib/apipie/error_description.rb' - 'lib/apipie/response_description_adapter.rb' - 'lib/apipie/see_description.rb' - 'lib/apipie/validator.rb' @@ -612,16 +829,6 @@ Lint/UnderscorePrefixedVariableName: - 'lib/apipie/application.rb' - 'lib/apipie/dsl_definition.rb' -# Offense count: 8 -# This cop supports safe autocorrection (--autocorrect). -Lint/UnifiedInteger: - Exclude: - - 'spec/controllers/users_controller_spec.rb' - - 'spec/dummy/app/controllers/users_controller.rb' - - 'spec/dummy/config/initializers/apipie.rb' - - 'spec/lib/param_description_spec.rb' - - 'spec/lib/validator_spec.rb' - # Offense count: 29 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments. @@ -678,49 +885,38 @@ Lint/Void: # Offense count: 57 # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes. Metrics/AbcSize: - Max: 98 - -# Offense count: 7 -# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods, inherit_mode. -# AllowedMethods: refine -Metrics/BlockLength: - Max: 271 + Max: 90 # Offense count: 4 # Configuration parameters: CountBlocks. Metrics/BlockNesting: Max: 4 -# Offense count: 12 -# Configuration parameters: CountComments, CountAsOne. -Metrics/ClassLength: - Max: 487 - -# Offense count: 28 +# Offense count: 25 # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods. Metrics/CyclomaticComplexity: Max: 24 -# Offense count: 70 +# Offense count: 71 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods. Metrics/MethodLength: - Max: 63 + Max: 58 # Offense count: 1 # Configuration parameters: CountComments, CountAsOne. Metrics/ModuleLength: Max: 119 -# Offense count: 4 +# Offense count: 5 # Configuration parameters: CountKeywordArgs. Metrics/ParameterLists: MaxOptionalParameters: 5 Max: 6 -# Offense count: 25 +# Offense count: 23 # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods. Metrics/PerceivedComplexity: - Max: 26 + Max: 25 # Offense count: 5 Naming/AccessorMethodName: @@ -729,6 +925,16 @@ Naming/AccessorMethodName: - 'spec/dummy/app/controllers/pets_controller.rb' - 'spec/dummy/app/controllers/users_controller.rb' +# Offense count: 15 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, BlockForwardingName. +# SupportedStyles: anonymous, explicit +Naming/BlockForwarding: + Exclude: + - 'lib/apipie/apipie_module.rb' + - 'lib/apipie/dsl_definition.rb' + - 'lib/apipie/resource_description.rb' + # Offense count: 1 # Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms. # CheckDefinitionPathHierarchyRoots: lib, spec, test, src @@ -753,21 +959,21 @@ Naming/HeredocDelimiterNaming: - 'spec/dummy/app/controllers/twitter_example_controller.rb' - 'spec/dummy/app/controllers/users_controller.rb' -# Offense count: 2 +# Offense count: 4 # Configuration parameters: EnforcedStyleForLeadingUnderscores. # SupportedStylesForLeadingUnderscores: disallowed, required, optional Naming/MemoizedInstanceVariableName: Exclude: - 'lib/apipie/apipie_module.rb' - - 'lib/apipie/application.rb' + - 'lib/apipie/generator/swagger/param_description/type.rb' + - 'lib/apipie/generator/swagger/type_extractor.rb' -# Offense count: 4 +# Offense count: 3 # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. -# AllowedNames: as, at, by, db, id, in, io, ip, of, on, os, pp, to +# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to Naming/MethodParameterName: Exclude: - 'lib/apipie/method_description.rb' - - 'lib/apipie/swagger_generator.rb' - 'spec/controllers/users_controller_spec.rb' # Offense count: 7 @@ -791,6 +997,12 @@ Naming/VariableNumber: Exclude: - 'spec/dummy/app/controllers/users_controller.rb' +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Performance/BindCall: + Exclude: + - 'lib/apipie/dsl_definition.rb' + # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). Performance/BlockGivenWithExplicitBlock: @@ -818,17 +1030,33 @@ Performance/Detect: Exclude: - 'spec/lib/swagger/rake_swagger_spec.rb' +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +Performance/InefficientHashSearch: + Exclude: + - 'lib/apipie/generator/swagger/warning.rb' + +# Offense count: 5 +# This cop supports unsafe autocorrection (--autocorrect-all). +Performance/MapCompact: + Exclude: + - 'lib/apipie/application.rb' + - 'lib/apipie/param_description.rb' + - 'lib/apipie/response_description.rb' + - 'spec/dummy/app/controllers/pets_using_auto_views_controller.rb' + # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). Performance/RedundantBlockCall: Exclude: - 'lib/apipie/extractor/recorder.rb' -# Offense count: 1 +# Offense count: 2 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: MaxKeyValuePairs. Performance/RedundantMerge: Exclude: + - 'lib/apipie/generator/swagger/param_description/type.rb' - 'lib/apipie/middleware/checksum_in_headers.rb' # Offense count: 8 @@ -860,6 +1088,7 @@ Performance/StringReplacement: - 'app/controllers/apipie/apipies_controller.rb' - 'lib/apipie/application.rb' - 'lib/apipie/extractor/writer.rb' + - 'lib/apipie/generator/swagger/operation_id.rb' - 'lib/apipie/static_dispatcher.rb' - 'lib/apipie/swagger_generator.rb' - 'lib/tasks/apipie.rake' @@ -877,12 +1106,15 @@ RSpec/Be: - 'spec/controllers/concerns_controller_spec.rb' - 'spec/controllers/users_controller_spec.rb' -# Offense count: 51 -# This cop supports safe autocorrection (--autocorrect). +# Offense count: 56 +# This cop supports unsafe autocorrection (--autocorrect-all). RSpec/BeEq: Exclude: - 'spec/controllers/apipies_controller_spec.rb' - 'spec/controllers/users_controller_spec.rb' + - 'spec/lib/generator/swagger/param_description/builder_spec.rb' + - 'spec/lib/generator/swagger/param_description_spec.rb' + - 'spec/lib/method_description/apis_service_spec.rb' - 'spec/lib/method_description_spec.rb' - 'spec/lib/param_description_spec.rb' - 'spec/lib/param_group_spec.rb' @@ -895,7 +1127,7 @@ RSpec/BeforeAfterAll: Exclude: - 'spec/controllers/users_controller_spec.rb' -# Offense count: 35 +# Offense count: 47 # Configuration parameters: Prefixes, AllowedPatterns. # Prefixes: when, with, without RSpec/ContextWording: @@ -904,6 +1136,10 @@ RSpec/ContextWording: - 'spec/controllers/apipies_controller_spec.rb' - 'spec/controllers/users_controller_spec.rb' - 'spec/lib/file_handler_spec.rb' + - 'spec/lib/generator/swagger/param_description/builder_spec.rb' + - 'spec/lib/generator/swagger/param_description/type_spec.rb' + - 'spec/lib/generator/swagger/type_extractor_spec.rb' + - 'spec/lib/method_description/apis_service_spec.rb' - 'spec/lib/param_description_spec.rb' - 'spec/lib/param_group_spec.rb' - 'spec/lib/validator_spec.rb' @@ -940,12 +1176,19 @@ RSpec/DescribedClass: - 'spec/lib/resource_description_spec.rb' - 'spec/lib/validators/array_validator_spec.rb' -# Offense count: 10 +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +RSpec/EmptyExampleGroup: + Exclude: + - 'spec/lib/generator/swagger/param_description/composite_spec.rb' + +# Offense count: 11 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowConsecutiveOneLiners. RSpec/EmptyLineAfterExample: Exclude: - 'spec/controllers/apipies_controller_spec.rb' + - 'spec/lib/generator/swagger/context_spec.rb' - 'spec/lib/swagger/swagger_dsl_spec.rb' # Offense count: 6 @@ -976,9 +1219,26 @@ RSpec/ExampleLength: # Offense count: 165 # This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: CustomTransform, IgnoredWords. +# Configuration parameters: CustomTransform, IgnoredWords, DisallowedExamples. +# DisallowedExamples: works RSpec/ExampleWording: - Enabled: false + Exclude: + - '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/memes_controller_spec.rb' + - 'spec/controllers/users_controller_spec.rb' + - 'spec/lib/application_spec.rb' + - 'spec/lib/extractor/writer_spec.rb' + - 'spec/lib/method_description_spec.rb' + - 'spec/lib/param_description_spec.rb' + - 'spec/lib/param_group_spec.rb' + - 'spec/lib/resource_description_spec.rb' + - 'spec/lib/swagger/swagger_dsl_spec.rb' + - 'spec/lib/validator_spec.rb' # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). @@ -991,7 +1251,7 @@ RSpec/ExpectInHook: Exclude: - 'spec/lib/extractor/writer_spec.rb' -# Offense count: 12 +# Offense count: 25 # Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly. # Include: **/*_spec*rb*, **/spec/**/* RSpec/FilePath: @@ -1003,6 +1263,19 @@ RSpec/FilePath: - 'spec/lib/extractor/middleware_spec.rb' - 'spec/lib/extractor/writer_spec.rb' - 'spec/lib/file_handler_spec.rb' + - 'spec/lib/generator/swagger/context_spec.rb' + - 'spec/lib/generator/swagger/operation_id_spec.rb' + - 'spec/lib/generator/swagger/param_description/builder_spec.rb' + - 'spec/lib/generator/swagger/param_description/composite_spec.rb' + - 'spec/lib/generator/swagger/param_description/description_spec.rb' + - 'spec/lib/generator/swagger/param_description/in_spec.rb' + - 'spec/lib/generator/swagger/param_description/name_spec.rb' + - 'spec/lib/generator/swagger/param_description/type_spec.rb' + - 'spec/lib/generator/swagger/param_description_spec.rb' + - 'spec/lib/generator/swagger/type_extractor_spec.rb' + - 'spec/lib/generator/swagger/warning_spec.rb' + - 'spec/lib/generator/swagger/warning_writer_spec.rb' + - 'spec/lib/method_description/apis_service_spec.rb' - 'spec/lib/method_description_spec.rb' - 'spec/lib/param_description_spec.rb' - 'spec/lib/resource_description_spec.rb' @@ -1032,7 +1305,7 @@ RSpec/HooksBeforeExamples: # Offense count: 2 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. -# SupportedStyles: single_line_only, single_statement_only, disallow +# SupportedStyles: single_line_only, single_statement_only, disallow, require_implicit RSpec/ImplicitSubject: Exclude: - 'spec/lib/application_spec.rb' @@ -1045,10 +1318,17 @@ RSpec/InstanceVariable: - 'spec/lib/method_description_spec.rb' - 'spec/lib/resource_description_spec.rb' -# Offense count: 1 +# Offense count: 9 # This cop supports safe autocorrection (--autocorrect). RSpec/LeadingSubject: Exclude: + - 'spec/lib/generator/swagger/context_spec.rb' + - 'spec/lib/generator/swagger/param_description/builder_spec.rb' + - 'spec/lib/generator/swagger/param_description/composite_spec.rb' + - 'spec/lib/generator/swagger/param_description/name_spec.rb' + - 'spec/lib/generator/swagger/param_description/type_spec.rb' + - 'spec/lib/generator/swagger/param_description_spec.rb' + - 'spec/lib/generator/swagger/type_extractor_spec.rb' - 'spec/support/rake.rb' # Offense count: 1 @@ -1062,41 +1342,47 @@ RSpec/LeakyConstantDeclaration: RSpec/MessageSpies: EnforcedStyle: receive -# Offense count: 95 +# Offense count: 98 RSpec/MultipleExpectations: Max: 19 -# Offense count: 12 +# Offense count: 64 # Configuration parameters: AllowSubject. RSpec/MultipleMemoizedHelpers: - Max: 6 + Max: 15 -# Offense count: 42 -# Configuration parameters: IgnoreSharedExamples. +# Offense count: 63 +# Configuration parameters: EnforcedStyle, IgnoreSharedExamples. +# SupportedStyles: always, named_only RSpec/NamedSubject: Exclude: - '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/users_controller_spec.rb' + - 'spec/lib/generator/swagger/param_description/builder_spec.rb' + - 'spec/lib/generator/swagger/param_description/type_spec.rb' + - 'spec/lib/generator/swagger/param_description_spec.rb' + - 'spec/lib/generator/swagger/type_extractor_spec.rb' + - 'spec/lib/generator/swagger/warning_spec.rb' + - 'spec/lib/generator/swagger/warning_writer_spec.rb' + - 'spec/lib/method_description/apis_service_spec.rb' - 'spec/lib/param_description_spec.rb' - 'spec/lib/rake_spec.rb' - 'spec/lib/swagger/rake_swagger_spec.rb' - 'spec/lib/swagger/swagger_dsl_spec.rb' -# Offense count: 31 +# Offense count: 43 # Configuration parameters: AllowedGroups. RSpec/NestedGroups: Max: 6 -# Offense count: 21 +# Offense count: 1 +# Configuration parameters: AllowedPatterns. +# AllowedPatterns: ^expect_, ^assert_ RSpec/NoExpectationExample: Exclude: - - 'spec/controllers/apipies_controller_spec.rb' - - 'spec/controllers/concerns_controller_spec.rb' - - 'spec/controllers/memes_controller_spec.rb' - 'spec/controllers/users_controller_spec.rb' - - 'spec/lib/swagger/rake_swagger_spec.rb' # Offense count: 11 # This cop supports safe autocorrection (--autocorrect). @@ -1107,6 +1393,16 @@ RSpec/NotToNot: - 'spec/lib/file_handler_spec.rb' - 'spec/lib/param_description_spec.rb' +# Offense count: 1 +RSpec/OverwritingSetup: + Exclude: + - 'spec/lib/generator/swagger/param_description/composite_spec.rb' + +# Offense count: 1 +RSpec/PendingWithoutReason: + Exclude: + - 'spec/lib/generator/swagger/param_description/composite_spec.rb' + # Offense count: 6 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: Strict, EnforcedStyle, AllowedExplicitMatchers. @@ -1122,6 +1418,11 @@ RSpec/RepeatedExample: - 'spec/lib/method_description_spec.rb' - 'spec/lib/resource_description_spec.rb' +# Offense count: 2 +RSpec/RepeatedExampleGroupBody: + Exclude: + - 'spec/lib/generator/swagger/warning_spec.rb' + # Offense count: 4 RSpec/RepeatedExampleGroupDescription: Exclude: @@ -1163,7 +1464,7 @@ Rails/Delegate: Exclude: - 'lib/apipie/response_description_adapter.rb' -# Offense count: 14 +# Offense count: 23 # Configuration parameters: EnforcedStyle. # SupportedStyles: slashes, arguments Rails/FilePath: @@ -1175,6 +1476,9 @@ Rails/FilePath: - 'spec/dummy/config/initializers/apipie.rb' - 'spec/lib/application_spec.rb' - 'spec/lib/extractor/writer_spec.rb' + - 'spec/lib/rake_spec.rb' + - 'spec/lib/swagger/rake_swagger_spec.rb' + - 'spec/spec_helper.rb' # Offense count: 5 # This cop supports safe autocorrection (--autocorrect). @@ -1192,16 +1496,17 @@ Rails/IndexBy: Exclude: - 'lib/apipie/swagger_generator.rb' -# Offense count: 5 +# Offense count: 6 # This cop supports unsafe autocorrection (--autocorrect-all). Rails/NegateInclude: Exclude: - 'lib/apipie/extractor/collector.rb' - 'lib/apipie/extractor/writer.rb' + - 'lib/apipie/generator/swagger/warning.rb' - 'lib/apipie/swagger_generator.rb' - 'spec/spec_helper.rb' -# Offense count: 9 +# Offense count: 8 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: Include. # Include: app/**/*.rb, config/**/*.rb, db/**/*.rb, lib/**/*.rb @@ -1217,10 +1522,11 @@ Rails/OutputSafety: Exclude: - 'lib/apipie/helpers.rb' -# Offense count: 5 +# Offense count: 6 # This cop supports safe autocorrection (--autocorrect). Rails/Pluck: Exclude: + - 'lib/apipie/extractor/writer.rb' - 'spec/lib/method_description_spec.rb' - 'spec/lib/resource_description_spec.rb' @@ -1243,8 +1549,7 @@ Rails/RakeEnvironment: - 'lib/tasks/apipie.rake' # Offense count: 18 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: SafeAutocorrect. +# This cop supports unsafe autocorrection (--autocorrect-all). Rails/RootPathnameMethods: Exclude: - 'lib/apipie/configuration.rb' @@ -1265,6 +1570,13 @@ Rails/TimeZone: Exclude: - 'lib/tasks/apipie.rake' +# Offense count: 3 +# This cop supports safe autocorrection (--autocorrect). +Rails/TopLevelHashWithIndifferentAccess: + Exclude: + - 'lib/apipie/application.rb' + - 'lib/apipie/configuration.rb' + # Offense count: 1 # This cop supports unsafe autocorrection (--autocorrect-all). Security/IoMethods: @@ -1288,6 +1600,13 @@ Style/AndOr: Exclude: - 'lib/apipie/param_description.rb' +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowOnlyRestArgument. +Style/ArgumentsForwarding: + Exclude: + - 'lib/apipie/dsl_definition.rb' + # Offense count: 17 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods. @@ -1310,7 +1629,13 @@ Style/CaseEquality: Exclude: - 'lib/apipie/validator.rb' -# Offense count: 11 +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/CaseLikeIf: + Exclude: + - 'lib/apipie/generator/swagger/operation_id.rb' + +# Offense count: 28 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. # SupportedStyles: nested, compact @@ -1318,6 +1643,23 @@ Style/ClassAndModuleChildren: Exclude: - 'lib/apipie/core_ext/route.rb' - 'lib/apipie/extractor.rb' + - 'lib/apipie/generator/generator.rb' + - 'lib/apipie/generator/swagger/context.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/type.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' @@ -1333,14 +1675,13 @@ Style/ClassCheck: - 'lib/apipie/errors.rb' - 'lib/apipie/validator.rb' -# Offense count: 4 +# Offense count: 2 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods. # AllowedMethods: ==, equal?, eql? Style/ClassEqualityComparison: Exclude: - 'lib/apipie/application.rb' - - 'lib/apipie/swagger_generator.rb' - 'lib/apipie/validator.rb' # Offense count: 1 @@ -1377,7 +1718,7 @@ Style/CommentedKeyword: - 'lib/apipie/dsl_definition.rb' - 'lib/apipie/extractor/recorder.rb' -# Offense count: 12 +# Offense count: 11 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions. # SupportedStyles: assign_to_condition, assign_inside_condition @@ -1391,11 +1732,6 @@ Style/ConditionalAssignment: - 'lib/apipie/swagger_generator.rb' - 'lib/tasks/apipie.rake' -# Offense count: 61 -# Configuration parameters: AllowedConstants. -Style/Documentation: - Enabled: false - # Offense count: 1 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. @@ -1470,7 +1806,7 @@ Style/FileWrite: Exclude: - 'lib/tasks/apipie.rake' -# Offense count: 7 +# Offense count: 6 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. # SupportedStyles: each, for @@ -1479,14 +1815,164 @@ Style/For: - 'lib/apipie/response_description_adapter.rb' - 'lib/apipie/swagger_generator.rb' -# Offense count: 109 +# Offense count: 8 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns, IgnoredMethods. +# SupportedStyles: annotated, template, unannotated +Style/FormatStringToken: + EnforcedStyle: template + +# Offense count: 142 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. # SupportedStyles: always, always_true, never Style/FrozenStringLiteralComment: - Enabled: false + Exclude: + - 'Gemfile' + - 'Rakefile' + - 'apipie-rails.gemspec' + - 'app/controllers/apipie/apipies_controller.rb' + - 'app/helpers/apipie_helper.rb' + - 'lib/apipie-rails.rb' + - 'lib/apipie/apipie_module.rb' + - 'lib/apipie/application.rb' + - 'lib/apipie/configuration.rb' + - 'lib/apipie/core_ext/route.rb' + - 'lib/apipie/dsl_definition.rb' + - 'lib/apipie/error_description.rb' + - 'lib/apipie/errors.rb' + - 'lib/apipie/extractor.rb' + - 'lib/apipie/extractor/collector.rb' + - 'lib/apipie/extractor/recorder.rb' + - 'lib/apipie/extractor/writer.rb' + - 'lib/apipie/generator/generator.rb' + - 'lib/apipie/generator/swagger/context.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/type.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/helpers.rb' + - 'lib/apipie/markup.rb' + - 'lib/apipie/method_description.rb' + - 'lib/apipie/method_description/api.rb' + - 'lib/apipie/method_description/apis_service.rb' + - 'lib/apipie/middleware/checksum_in_headers.rb' + - 'lib/apipie/param_description.rb' + - 'lib/apipie/railtie.rb' + - 'lib/apipie/resource_description.rb' + - 'lib/apipie/response_description.rb' + - 'lib/apipie/response_description_adapter.rb' + - 'lib/apipie/routes_formatter.rb' + - 'lib/apipie/routing.rb' + - 'lib/apipie/rspec/response_validation_helper.rb' + - 'lib/apipie/see_description.rb' + - 'lib/apipie/static_dispatcher.rb' + - 'lib/apipie/swagger_generator.rb' + - 'lib/apipie/tag_list_description.rb' + - 'lib/apipie/validator.rb' + - 'lib/apipie/version.rb' + - 'lib/generators/apipie/install/install_generator.rb' + - 'lib/generators/apipie/views_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/apipies_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/memes_controller_spec.rb' + - 'spec/controllers/users_controller_spec.rb' + - 'spec/dummy/Gemfile' + - 'spec/dummy/Rakefile' + - 'spec/dummy/app/controllers/api/base_controller.rb' + - 'spec/dummy/app/controllers/api/v1/architectures_controller.rb' + - 'spec/dummy/app/controllers/api/v1/base_controller.rb' + - 'spec/dummy/app/controllers/api/v2/architectures_controller.rb' + - 'spec/dummy/app/controllers/api/v2/base_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/concerns_controller.rb' + - 'spec/dummy/app/controllers/extended_controller.rb' + - 'spec/dummy/app/controllers/extending_concern.rb' + - 'spec/dummy/app/controllers/files_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_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/app/helpers/random_param_group.rb' + - 'spec/dummy/bin/setup' + - 'spec/dummy/components/test_engine/Gemfile' + - 'spec/dummy/components/test_engine/app/controllers/test_engine/application_controller.rb' + - 'spec/dummy/components/test_engine/app/controllers/test_engine/memes_controller.rb' + - 'spec/dummy/components/test_engine/config/routes.rb' + - 'spec/dummy/components/test_engine/lib/test_engine.rb' + - 'spec/dummy/components/test_engine/test_engine.gemspec' + - 'spec/dummy/config.ru' + - 'spec/dummy/config/application.rb' + - 'spec/dummy/config/boot.rb' + - 'spec/dummy/config/environment.rb' + - 'spec/dummy/config/environments/development.rb' + - 'spec/dummy/config/environments/production.rb' + - 'spec/dummy/config/environments/test.rb' + - 'spec/dummy/config/initializers/apipie.rb' + - 'spec/dummy/config/initializers/backtrace_silencers.rb' + - 'spec/dummy/config/initializers/inflections.rb' + - 'spec/dummy/config/initializers/mime_types.rb' + - 'spec/dummy/config/initializers/secret_token.rb' + - 'spec/dummy/config/initializers/session_store.rb' + - 'spec/dummy/config/routes.rb' + - 'spec/dummy/script/rails' + - 'spec/lib/application_spec.rb' + - 'spec/lib/extractor/extractor_spec.rb' + - 'spec/lib/extractor/middleware_spec.rb' + - 'spec/lib/extractor/writer_spec.rb' + - 'spec/lib/file_handler_spec.rb' + - 'spec/lib/generator/swagger/context_spec.rb' + - 'spec/lib/generator/swagger/operation_id_spec.rb' + - 'spec/lib/generator/swagger/param_description/builder_spec.rb' + - 'spec/lib/generator/swagger/param_description/composite_spec.rb' + - 'spec/lib/generator/swagger/param_description/description_spec.rb' + - 'spec/lib/generator/swagger/param_description/in_spec.rb' + - 'spec/lib/generator/swagger/param_description/name_spec.rb' + - 'spec/lib/generator/swagger/param_description/type_spec.rb' + - 'spec/lib/generator/swagger/param_description_spec.rb' + - 'spec/lib/generator/swagger/type_extractor_spec.rb' + - 'spec/lib/generator/swagger/warning_spec.rb' + - 'spec/lib/generator/swagger/warning_writer_spec.rb' + - 'spec/lib/method_description/apis_service_spec.rb' + - 'spec/lib/method_description_spec.rb' + - 'spec/lib/param_description_spec.rb' + - 'spec/lib/param_group_spec.rb' + - 'spec/lib/rake_spec.rb' + - 'spec/lib/resource_description_spec.rb' + - 'spec/lib/swagger/rake_swagger_spec.rb' + - 'spec/lib/swagger/response_validation_spec.rb' + - 'spec/lib/swagger/swagger_dsl_spec.rb' + - 'spec/lib/validator_spec.rb' + - 'spec/lib/validators/array_validator_spec.rb' + - 'spec/spec_helper.rb' + - 'spec/support/custom_bool_validator.rb' + - 'spec/support/rake.rb' # Offense count: 35 +# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals. Style/GuardClause: Exclude: @@ -1495,6 +1981,8 @@ Style/GuardClause: - 'lib/apipie/extractor.rb' - 'lib/apipie/extractor/collector.rb' - 'lib/apipie/extractor/writer.rb' + - 'lib/apipie/generator/swagger/param_description/builder.rb' + - 'lib/apipie/generator/swagger/param_description/composite.rb' - 'lib/apipie/param_description.rb' - 'lib/apipie/resource_description.rb' - 'lib/apipie/rspec/response_validation_helper.rb' @@ -1511,15 +1999,23 @@ Style/HashConversion: Exclude: - 'lib/apipie/swagger_generator.rb' -# Offense count: 840 +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/HashExcept: + Exclude: + - 'lib/apipie/param_description.rb' + +# Offense count: 4 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys # SupportedShorthandSyntax: always, never, either, consistent Style/HashSyntax: - Enabled: false + Exclude: + - 'lib/apipie/swagger_generator.rb' + - 'spec/dummy/config/routes.rb' -# Offense count: 4 +# Offense count: 3 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowIfModifier. Style/IfInsideElse: @@ -1528,10 +2024,36 @@ Style/IfInsideElse: - 'lib/apipie/swagger_generator.rb' - 'spec/spec_helper.rb' -# Offense count: 66 +# Offense count: 76 # This cop supports safe autocorrection (--autocorrect). Style/IfUnlessModifier: - Enabled: false + Exclude: + - 'Gemfile' + - 'app/controllers/apipie/apipies_controller.rb' + - 'lib/apipie/application.rb' + - 'lib/apipie/dsl_definition.rb' + - 'lib/apipie/extractor.rb' + - 'lib/apipie/extractor/collector.rb' + - 'lib/apipie/extractor/writer.rb' + - 'lib/apipie/generator/swagger/param_description/composite.rb' + - 'lib/apipie/generator/swagger/param_description/type.rb' + - 'lib/apipie/generator/swagger/type_extractor.rb' + - 'lib/apipie/generator/swagger/warning.rb' + - 'lib/apipie/method_description.rb' + - 'lib/apipie/param_description.rb' + - 'lib/apipie/resource_description.rb' + - 'lib/apipie/routes_formatter.rb' + - 'lib/apipie/rspec/response_validation_helper.rb' + - 'lib/apipie/see_description.rb' + - 'lib/apipie/swagger_generator.rb' + - 'lib/apipie/validator.rb' + - 'lib/tasks/apipie.rake' + - 'spec/dummy/Gemfile' + - 'spec/dummy/app/controllers/application_controller.rb' + - 'spec/dummy/app/controllers/users_controller.rb' + - 'spec/dummy/config/initializers/apipie.rb' + - 'spec/lib/swagger/swagger_dsl_spec.rb' + - 'spec/spec_helper.rb' # Offense count: 4 # This cop supports unsafe autocorrection (--autocorrect-all). @@ -1592,30 +2114,36 @@ Style/MultilineBlockChain: Exclude: - 'lib/apipie/param_description.rb' -# Offense count: 2 +# Offense count: 1 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowMethodComparison. Style/MultipleComparison: Exclude: - 'lib/apipie/validator.rb' - - 'spec/dummy/config/initializers/apipie.rb' -# Offense count: 3 +# Offense count: 7 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. # SupportedStyles: literals, strict Style/MutableConstant: Exclude: - 'lib/apipie/extractor/recorder.rb' + - 'lib/apipie/generator/swagger/param_description/in.rb' + - 'lib/apipie/generator/swagger/type_extractor.rb' + - 'lib/apipie/generator/swagger/warning.rb' - 'lib/apipie/routes_formatter.rb' - 'lib/apipie/version.rb' -# Offense count: 12 +# Offense count: 13 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: both, prefix, postfix Style/NegatedIf: Exclude: + - 'lib/apipie/generator/swagger/param_description/builder.rb' + - 'lib/apipie/generator/swagger/param_description/composite.rb' + - 'lib/apipie/generator/swagger/warning.rb' + - 'lib/apipie/method_description/apis_service.rb' - 'lib/apipie/param_description.rb' - 'lib/apipie/rspec/response_validation_helper.rb' - 'lib/apipie/swagger_generator.rb' @@ -1637,11 +2165,12 @@ Style/NestedParenthesizedCalls: - 'spec/lib/file_handler_spec.rb' # Offense count: 1 -Style/OpenStructUse: - Exclude: - - 'lib/apipie/swagger_generator.rb' +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: Strict, AllowedNumbers, AllowedPatterns. +Style/NumericLiterals: + MinDigits: 6 -# Offense count: 14 +# Offense count: 11 # Configuration parameters: AllowedMethods. # AllowedMethods: respond_to_missing? Style/OptionalBooleanParameter: @@ -1719,6 +2248,16 @@ Style/RedundantConditional: - 'lib/apipie/validator.rb' - 'lib/tasks/apipie.rake' +# Offense count: 9 +# This cop supports safe autocorrection (--autocorrect). +Style/RedundantConstantBase: + Exclude: + - 'lib/tasks/apipie.rake' + - 'spec/dummy/config.ru' + - 'spec/lib/rake_spec.rb' + - 'spec/lib/swagger/rake_swagger_spec.rb' + - 'spec/spec_helper.rb' + # Offense count: 5 # This cop supports unsafe autocorrection (--autocorrect-all). Style/RedundantInterpolation: @@ -1740,7 +2279,7 @@ Style/RedundantPercentQ: Exclude: - 'apipie-rails.gemspec' -# Offense count: 37 +# Offense count: 35 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowMultipleReturnValues. Style/RedundantReturn: @@ -1766,16 +2305,22 @@ Style/RedundantSelf: - 'lib/apipie/application.rb' - 'lib/apipie/dsl_definition.rb' - 'lib/apipie/extractor/writer.rb' + - 'lib/apipie/generator/swagger/type.rb' - 'lib/apipie/method_description.rb' - 'lib/apipie/param_description.rb' - 'lib/apipie/resource_description.rb' - 'lib/apipie/response_description.rb' - 'lib/apipie/response_description_adapter.rb' - - 'lib/apipie/swagger_generator.rb' - 'lib/apipie/validator.rb' - 'spec/dummy/app/controllers/pets_using_auto_views_controller.rb' - 'spec/dummy/config/initializers/apipie.rb' +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Style/RedundantStringEscape: + Exclude: + - 'spec/dummy/app/controllers/users_controller.rb' + # Offense count: 12 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, AllowInnerSlashes. @@ -1785,6 +2330,7 @@ Style/RegexpLiteral: - 'lib/apipie/extractor.rb' - 'lib/apipie/extractor/collector.rb' - 'lib/apipie/extractor/recorder.rb' + - 'lib/apipie/generator/swagger/operation_id.rb' - 'lib/apipie/helpers.rb' - 'lib/apipie/routing.rb' - 'lib/apipie/swagger_generator.rb' @@ -1822,13 +2368,12 @@ Style/Semicolon: Exclude: - 'lib/apipie/method_description.rb' -# Offense count: 11 +# Offense count: 2 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowIfMethodIsEmpty. Style/SingleLineMethods: Exclude: - 'lib/apipie/resource_description.rb' - - 'lib/apipie/swagger_generator.rb' - 'lib/apipie/tag_list_description.rb' # Offense count: 6 @@ -1841,12 +2386,11 @@ Style/SlicingWithRange: - 'lib/apipie/param_description.rb' - 'lib/tasks/apipie.rake' -# Offense count: 4 +# Offense count: 3 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowModifier. Style/SoleNestedConditional: Exclude: - - 'lib/apipie/swagger_generator.rb' - 'lib/apipie/validator.rb' - 'spec/lib/swagger/swagger_dsl_spec.rb' @@ -1866,12 +2410,92 @@ Style/StringConcatenation: - 'lib/apipie/extractor/writer.rb' - 'lib/apipie/swagger_generator.rb' -# Offense count: 1301 +# Offense count: 1304 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. # SupportedStyles: single_quotes, double_quotes Style/StringLiterals: - Enabled: false + Exclude: + - 'Gemfile' + - '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/swagger_generator.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/apipies_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/memes_controller_spec.rb' + - 'spec/controllers/users_controller_spec.rb' + - 'spec/dummy/Gemfile' + - '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/bin/setup' + - 'spec/dummy/components/test_engine/Gemfile' + - 'spec/dummy/config/application.rb' + - 'spec/dummy/config/initializers/apipie.rb' + - 'spec/dummy/config/routes.rb' + - 'spec/lib/application_spec.rb' + - 'spec/lib/extractor/extractor_spec.rb' + - 'spec/lib/extractor/middleware_spec.rb' + - 'spec/lib/extractor/writer_spec.rb' + - 'spec/lib/file_handler_spec.rb' + - 'spec/lib/generator/swagger/operation_id_spec.rb' + - 'spec/lib/generator/swagger/param_description/composite_spec.rb' + - 'spec/lib/generator/swagger/type_extractor_spec.rb' + - 'spec/lib/generator/swagger/warning_spec.rb' + - 'spec/lib/method_description_spec.rb' + - 'spec/lib/param_description_spec.rb' + - 'spec/lib/param_group_spec.rb' + - 'spec/lib/rake_spec.rb' + - 'spec/lib/resource_description_spec.rb' + - 'spec/lib/swagger/rake_swagger_spec.rb' + - 'spec/lib/swagger/response_validation_spec.rb' + - 'spec/lib/swagger/swagger_dsl_spec.rb' + - 'spec/lib/validator_spec.rb' + - 'spec/lib/validators/array_validator_spec.rb' + - 'spec/spec_helper.rb' + - 'spec/support/custom_bool_validator.rb' + - 'spec/support/rake.rb' # Offense count: 38 # This cop supports safe autocorrection (--autocorrect). @@ -1889,12 +2513,14 @@ Style/TrailingCommaInArrayLiteral: - 'spec/controllers/users_controller_spec.rb' - 'spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb' -# Offense count: 4 +# Offense count: 5 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyleForMultiline. # SupportedStylesForMultiline: comma, consistent_comma, no_comma Style/TrailingCommaInHashLiteral: Exclude: + - 'lib/apipie/generator/swagger/param_description.rb' + - 'lib/apipie/generator/swagger/param_description/builder.rb' - 'lib/apipie/response_description.rb' - 'lib/apipie/swagger_generator.rb' - 'spec/controllers/users_controller_spec.rb' @@ -1915,27 +2541,30 @@ Style/UnlessElse: - 'lib/apipie/validator.rb' - 'spec/lib/swagger/swagger_dsl_spec.rb' -# Offense count: 32 +# Offense count: 37 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, MinSize, WordRegex. # SupportedStyles: percent, brackets Style/WordArray: Exclude: + - 'lib/apipie/generator/swagger/param_description/in.rb' - 'lib/apipie/swagger_generator.rb' - 'spec/controllers/users_controller_spec.rb' - 'spec/dummy/app/controllers/pets_controller.rb' - 'spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb' - 'spec/dummy/app/controllers/twitter_example_controller.rb' - 'spec/dummy/app/controllers/users_controller.rb' + - 'spec/lib/generator/swagger/param_description/type_spec.rb' - 'spec/lib/method_description_spec.rb' - 'spec/lib/resource_description_spec.rb' - 'spec/lib/swagger/rake_swagger_spec.rb' - 'spec/lib/swagger/swagger_dsl_spec.rb' - 'spec/lib/validators/array_validator_spec.rb' -# Offense count: 4 +# Offense count: 3 # This cop supports unsafe autocorrection (--autocorrect-all). Style/ZeroLengthPredicate: Exclude: + - 'lib/apipie/generator/swagger/param_description/composite.rb' - 'lib/apipie/swagger_generator.rb' - 'spec/lib/swagger/swagger_dsl_spec.rb'