diff options
author | 2019-12-20 10:02:20 +0100 | |
---|---|---|
committer | 2019-12-20 10:08:37 +0100 | |
commit | 4aed19f39ccb9a23d585714f5218e641e0afc5ba (patch) | |
tree | 93e5ac90586efec7858ca878c0cf813dbb1f057e | |
parent | Remove unused base_settings variable (diff) | |
download | packages-5-4aed19f39ccb9a23d585714f5218e641e0afc5ba.tar.gz packages-5-4aed19f39ccb9a23d585714f5218e641e0afc5ba.tar.bz2 packages-5-4aed19f39ccb9a23d585714f5218e641e0afc5ba.zip |
Update to latest rubocop versions
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
-rw-r--r-- | .rubocop.yml | 4 | ||||
-rw-r--r-- | .rubocop_todo.yml | 200 | ||||
-rw-r--r-- | Gemfile | 6 | ||||
-rw-r--r-- | Gemfile.lock | 18 |
4 files changed, 93 insertions, 135 deletions
diff --git a/.rubocop.yml b/.rubocop.yml index 0d4642a..66b5abe 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -7,6 +7,8 @@ require: AllCops: TargetRubyVersion: 2.5 TargetRailsVersion: 6.0 + Exclude: + - vendor/**/* Rails: Enabled: true @@ -26,7 +28,7 @@ Metrics/ModuleLength: Metrics/ClassLength: Max: 200 -Naming/UncommunicativeMethodParamName: +Naming/MethodParameterName: AllowedNames: - io - id diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 537bffe..0edb760 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2019-07-22 20:02:18 +0200 using RuboCop version 0.73.0. +# on 2019-12-20 10:00:15 +0100 using RuboCop version 0.77.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 @@ -14,19 +14,6 @@ Bundler/OrderedGems: Exclude: - 'Gemfile' -# Offense count: 33 -# Cop supports --auto-correct. -# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle. -# SupportedHashRocketStyles: key, separator, table -# SupportedColonStyles: key, separator, table -# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit -Layout/AlignHash: - Exclude: - - 'config/initializers/kkuleomi_data.rb' - - 'lib/kkuleomi/store.rb' - - 'lib/portage/util/metadata.rb' - - 'lib/portage/util/metadata_cache.rb' - # Offense count: 3 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, IndentOneStep, IndentationWidth. @@ -106,52 +93,53 @@ Layout/ExtraSpacing: Exclude: - 'app/views/useflags/popular.json.jbuilder' -# Offense count: 2 +# Offense count: 1 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, IndentationWidth. # SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses -Layout/IndentFirstArgument: +Layout/FirstArgumentIndentation: Exclude: - - 'lib/kkuleomi/store/model.rb' - 'lib/kkuleomi/store/suggester.rb' # Offense count: 1 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, IndentationWidth. # SupportedStyles: special_inside_parentheses, consistent, align_brackets -Layout/IndentFirstArrayElement: +Layout/FirstArrayElementIndentation: Exclude: - 'lib/kkuleomi/store.rb' -# Offense count: 14 +# Offense count: 5 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, IndentationWidth. # SupportedStyles: special_inside_parentheses, consistent, align_braces -Layout/IndentFirstHashElement: +Layout/FirstHashElementIndentation: Exclude: - - 'app/models/package.rb' - - 'lib/kkuleomi/store.rb' - 'lib/kkuleomi/store/suggester.rb' - 'test/lib/portage/util/atoms_test.rb' - 'test/lib/portage/util/versions_test.rb' -# Offense count: 1 +# Offense count: 30 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle. -# SupportedStyles: squiggly, active_support, powerpack, unindent -Layout/IndentHeredoc: +# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle. +# SupportedHashRocketStyles: key, separator, table +# SupportedColonStyles: key, separator, table +# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit +Layout/HashAlignment: Exclude: - - 'app/views/about/legacy.atom.builder' + - 'config/initializers/kkuleomi_data.rb' + - 'lib/portage/util/metadata.rb' + - 'lib/portage/util/metadata_cache.rb' # Offense count: 1 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. -# SupportedStyles: normal, indented_internal_methods -Layout/IndentationConsistency: +# SupportedStyles: squiggly, active_support, powerpack, unindent +Layout/HeredocIndentation: Exclude: - - 'lib/kkuleomi/store.rb' + - 'app/views/about/legacy.atom.builder' -# Offense count: 5 +# Offense count: 4 # Cop supports --auto-correct. # Configuration parameters: Width, IgnoredPatterns. Layout/IndentationWidth: @@ -235,13 +223,12 @@ Layout/SpaceInsidePercentLiteralDelimiters: - 'lib/portage/util/metadata_cache.rb' - 'lib/portage/util/versions.rb' -# Offense count: 35 +# Offense count: 26 # Cop supports --auto-correct. # Configuration parameters: IndentationWidth. Layout/Tab: Exclude: - 'app/helpers/packages_helper.rb' - - 'app/models/package.rb' - 'config/initializers/kkuleomi_config.rb' - 'config/initializers/sidekiq.rb' - 'lib/kkuleomi/store.rb' @@ -250,7 +237,7 @@ Layout/Tab: # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. # SupportedStyles: final_newline, final_blank_line -Layout/TrailingBlankLines: +Layout/TrailingEmptyLines: Exclude: - 'app/views/categories/show.json.jbuilder' - 'config/initializers/core_ext.rb' @@ -277,7 +264,7 @@ Lint/NestedMethodDefinition: Exclude: - 'lib/portage/util/versions.rb' -# Offense count: 12 +# Offense count: 13 # Configuration parameters: AllowKeywordBlockArguments. Lint/UnderscorePrefixedVariableName: Exclude: @@ -300,25 +287,30 @@ Lint/UnusedMethodArgument: - 'app/jobs/useflags_update_job.rb' - 'lib/kkuleomi/store/models/version_import.rb' -# Offense count: 27 +# Offense count: 30 Metrics/AbcSize: Max: 57 -# Offense count: 6 +# Offense count: 8 # Configuration parameters: CountComments, ExcludedMethods. # ExcludedMethods: refine Metrics/BlockLength: Max: 51 -# Offense count: 8 +# Offense count: 9 Metrics/CyclomaticComplexity: Max: 18 -# Offense count: 41 +# Offense count: 45 # Configuration parameters: CountComments, ExcludedMethods. Metrics/MethodLength: Max: 42 +# Offense count: 1 +# Configuration parameters: CountKeywordArgs. +Metrics/ParameterLists: + Max: 6 + # Offense count: 8 Metrics/PerceivedComplexity: Max: 19 @@ -330,11 +322,20 @@ Naming/MemoizedInstanceVariableName: Exclude: - 'lib/portage/repository/model.rb' +# Offense count: 11 +# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. +# AllowedNames: io, id, to, by, on, in, at, ip, db, os +Naming/MethodParameterName: + Exclude: + - 'lib/portage/util/metadata_cache.rb' + - 'lib/portage/util/versions.rb' + - 'test/lib/portage/util/versions_test.rb' + # Offense count: 3 -# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros. +# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros. # NamePrefix: is_, has_, have_ -# NamePrefixBlacklist: is_, has_, have_ -# NameWhitelist: is_a? +# ForbiddenPrefixes: is_, has_, have_ +# AllowedMethods: is_a? # MethodDefinitionMacros: define_method, define_singleton_method Naming/PredicateName: Exclude: @@ -343,19 +344,6 @@ Naming/PredicateName: - 'app/models/version.rb' - 'lib/core_ext/string.rb' -# Offense count: 21 -# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. -# AllowedNames: io, id, to, by, on, in, at, ip, db, n -Naming/UncommunicativeMethodParamName: - Exclude: - - 'app/models/useflag.rb' - - 'app/models/version.rb' - - 'lib/kkuleomi/store/models/package_search.rb' - - 'lib/kkuleomi/store/suggester.rb' - - 'lib/portage/util/metadata_cache.rb' - - 'lib/portage/util/versions.rb' - - 'test/lib/portage/util/versions_test.rb' - # Offense count: 4 # Configuration parameters: EnforcedStyle. # SupportedStyles: snake_case, normalcase, non_integer @@ -363,25 +351,28 @@ Naming/VariableNumber: Exclude: - 'lib/portage/util/versions.rb' -# Offense count: 2 +# Offense count: 4 # Cop supports --auto-correct. Performance/RegexpMatch: Exclude: + - 'app/views/useflags/popular.json.jbuilder' + - 'lib/portage/repository/model.rb' - 'lib/portage/util/atoms.rb' -# Offense count: 3 +# Offense count: 1 # Cop supports --auto-correct. # Configuration parameters: NilOrEmpty, NotPresent, UnlessPresent. Rails/Blank: Exclude: - 'app/helpers/application_helper.rb' - - 'lib/kkuleomi/store/models/package_search.rb' -# Offense count: 1 +# Offense count: 3 # Configuration parameters: EnforcedStyle. # SupportedStyles: slashes, arguments Rails/FilePath: Exclude: + - 'config/environments/development.rb' + - 'config/environments/test.rb' - 'config/initializers/core_ext.rb' # Offense count: 1 @@ -452,20 +443,19 @@ Style/CaseEquality: Exclude: - 'lib/core_ext/string.rb' -# Offense count: 24 +# Offense count: 22 # Cop supports --auto-correct. # Configuration parameters: AutoCorrect, EnforcedStyle. # SupportedStyles: nested, compact Style/ClassAndModuleChildren: Enabled: false -# Offense count: 3 +# Offense count: 2 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions. # SupportedStyles: assign_to_condition, assign_inside_condition Style/ConditionalAssignment: Exclude: - - 'app/models/useflag.rb' - 'lib/kkuleomi/util/exec.rb' - 'lib/portage/util/metadata_cache.rb' @@ -485,7 +475,7 @@ Style/ExpandPathArguments: - 'Rakefile' - 'test/test_helper.rb' -# Offense count: 38 +# Offense count: 41 # Configuration parameters: EnforcedStyle. # SupportedStyles: annotated, template, unannotated Style/FormatStringToken: @@ -503,7 +493,7 @@ Style/FormatStringToken: - 'lib/portage/util/maskfile.rb' - 'lib/portage/util/projects.rb' -# Offense count: 117 +# Offense count: 134 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. # SupportedStyles: always, never @@ -541,17 +531,15 @@ Style/IfInsideElse: Exclude: - 'app/models/version.rb' -# Offense count: 12 +# Offense count: 11 # Cop supports --auto-correct. Style/IfUnlessModifier: Exclude: - - 'app/helpers/packages_helper.rb' - 'app/jobs/category_update_job.rb' - 'app/jobs/package_update_job.rb' - 'app/models/version.rb' - 'app/views/packages/show.json.jbuilder' - 'config/initializers/kkuleomi_config.rb' - - 'config/initializers/sidekiq.rb' - 'lib/kkuleomi/store/models/package_import.rb' - 'lib/portage/repository/category.rb' - 'lib/portage/repository/ebuild.rb' @@ -566,13 +554,6 @@ Style/InverseMethods: - 'app/helpers/portage_helper.rb' - 'app/models/package.rb' -# Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: IgnoredMethods. -Style/MethodCallWithoutArgsParentheses: - Exclude: - - 'lib/kkuleomi/store/models/version_import.rb' - # Offense count: 1 Style/MixinUsage: Exclude: @@ -597,8 +578,8 @@ Style/MutableConstant: # Offense count: 8 # Cop supports --auto-correct. -# Configuration parameters: Whitelist. -# Whitelist: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with +# Configuration parameters: AllowedMethods. +# AllowedMethods: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with Style/NestedParenthesizedCalls: Exclude: - 'app/views/feeds/changes.atom.builder' @@ -625,7 +606,7 @@ Style/Not: - 'app/helpers/portage_helper.rb' - 'app/models/package.rb' -# Offense count: 2 +# Offense count: 4 # Cop supports --auto-correct. # Configuration parameters: Strict. Style/NumericLiterals: @@ -649,14 +630,13 @@ Style/ParallelAssignment: Exclude: - 'lib/portage/util/history.rb' -# Offense count: 3 +# Offense count: 2 # Cop supports --auto-correct. # Configuration parameters: PreferredDelimiters. Style/PercentLiteralDelimiters: Exclude: - 'config/application.rb' - 'config/initializers/kkuleomi_config.rb' - - 'lib/kkuleomi/store.rb' # Offense count: 1 # Cop supports --auto-correct. @@ -666,6 +646,19 @@ Style/PreferredHashMethods: Exclude: - 'app/jobs/record_change_job.rb' +# Offense count: 1 +# Cop supports --auto-correct. +Style/RedundantInterpolation: + Exclude: + - 'lib/portage/repository/package.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: AllowMultipleReturnValues. +Style/RedundantReturn: + Exclude: + - 'app/controllers/useflags_controller.rb' + # Offense count: 2 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, AllowInnerSlashes. @@ -675,12 +668,6 @@ Style/RegexpLiteral: - 'app/helpers/useflags_helper.rb' - 'lib/portage/util/atoms.rb' -# Offense count: 1 -# Cop supports --auto-correct. -Style/RescueModifier: - Exclude: - - 'lib/kkuleomi/store.rb' - # Offense count: 2 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. @@ -692,8 +679,8 @@ Style/RescueStandardError: # Offense count: 2 # Cop supports --auto-correct. -# Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist. -# Whitelist: present?, blank?, presence, try, try! +# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods. +# AllowedMethods: present?, blank?, presence, try, try! Style/SafeNavigation: Exclude: - 'lib/portage/util/atoms.rb' @@ -734,7 +721,7 @@ Style/StderrPuts: Exclude: - 'bin/yarn' -# Offense count: 27 +# Offense count: 28 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. # SupportedStyles: single_quotes, double_quotes @@ -750,7 +737,7 @@ Style/StringLiterals: - 'test/controllers/index_controller_test.rb' - 'test/controllers/useflags_controller_test.rb' -# Offense count: 3 +# Offense count: 4 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, MinSize. # SupportedStyles: percent, brackets @@ -771,44 +758,13 @@ Style/SymbolProc: # Offense count: 1 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyleForMultiline. -# SupportedStylesForMultiline: comma, consistent_comma, no_comma -Style/TrailingCommaInArguments: - Exclude: - - 'lib/kkuleomi/store/models/package_search.rb' - -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyleForMultiline. -# SupportedStylesForMultiline: comma, consistent_comma, no_comma -Style/TrailingCommaInArrayLiteral: - Exclude: - - 'lib/kkuleomi/store.rb' - -# Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyleForMultiline. -# SupportedStylesForMultiline: comma, consistent_comma, no_comma -Style/TrailingCommaInHashLiteral: - Exclude: - - 'lib/kkuleomi/store.rb' - - 'lib/kkuleomi/store/models/package_search.rb' - -# Offense count: 1 -# Cop supports --auto-correct. Style/UnlessElse: Exclude: - 'app/controllers/useflags_controller.rb' -# Offense count: 1 -# Cop supports --auto-correct. -Style/UnneededInterpolation: - Exclude: - - 'lib/portage/repository/package.rb' - -# Offense count: 110 +# Offense count: 148 # Cop supports --auto-correct. # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. # URISchemes: http, https Metrics/LineLength: - Max: 150 + Max: 148 @@ -61,9 +61,9 @@ group :development do # Rubocop modules to help with consistent style and to avoid common # issues. - gem 'rubocop', '0.73.0' - gem 'rubocop-performance', '1.4.0' - gem 'rubocop-rails', '2.2.1' + gem 'rubocop', '0.77.0' + gem 'rubocop-performance', '1.5.1' + gem 'rubocop-rails', '2.4.0' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' diff --git a/Gemfile.lock b/Gemfile.lock index b544e32..2444814 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -94,7 +94,7 @@ GEM hashie (3.6.0) i18n (1.6.0) concurrent-ruby (~> 1.0) - jaro_winkler (1.5.3) + jaro_winkler (1.5.4) jbuilder (2.9.1) activesupport (>= 4.2.0) jquery-rails (4.3.5) @@ -127,8 +127,8 @@ GEM octicons_helper (9.1.1) octicons (= 9.1.1) rails - parallel (1.17.0) - parser (2.6.4.1) + parallel (1.19.1) + parser (2.6.5.0) ast (~> 2.4.0) parslet (1.8.2) rack (2.0.7) @@ -174,16 +174,16 @@ GEM rdiscount (2.2.0.1) rdoc (6.2.0) redis (4.1.3) - rubocop (0.73.0) + rubocop (0.77.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) parser (>= 2.6) rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 1.7) - rubocop-performance (1.4.0) + rubocop-performance (1.5.1) rubocop (>= 0.71.0) - rubocop-rails (2.2.1) + rubocop-rails (2.4.0) rack (>= 1.1) rubocop (>= 0.72.0) ruby-progressbar (1.10.1) @@ -252,9 +252,9 @@ DEPENDENCIES rails (~> 6.0.0) rails-controller-testing rdiscount - rubocop (= 0.73.0) - rubocop-performance (= 1.4.0) - rubocop-rails (= 2.2.1) + rubocop (= 0.77.0) + rubocop-performance (= 1.5.1) + rubocop-rails (= 2.4.0) sassc-rails (~> 2.0) sdoc (~> 1.0) sidekiq |