omnibus-gitlab/.rubocop_todo.yml

444 lines
16 KiB
YAML

# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2022-09-15 00:00:00 UTC using RuboCop version 1.36.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
# versions of RuboCop, may require this file to be generated again.
# Offense count: 739
CodeReuse/ActiveRecord:
Enabled: false
# Offense count: 5
Cop/AvoidReturnFromBlocks:
Exclude:
- 'files/gitlab-cookbooks/consul/libraries/consul_helper.rb'
- 'files/gitlab-ctl-commands-ee/lib/patroni.rb'
- 'files/gitlab-ctl-commands-ee/lib/postgresql/ee.rb'
- 'lib/gitlab/tasks/build.rake'
# Offense count: 41
# This cop supports safe autocorrection (--autocorrect).
Cop/LineBreakAroundConditionalBlock:
Enabled: false
# Offense count: 8
Fips/MD5:
Exclude:
- 'config/software/gitlab-geo-psql.rb'
- 'config/software/gitlab-healthcheck.rb'
- 'config/software/gitlab-pg-ctl.rb'
- 'config/software/gitlab-psql.rb'
- 'config/software/gitlab-redis-cli.rb'
- 'config/software/gitlab-backup-cli.rb'
- 'files/gitlab-cookbooks/gitlab/libraries/helpers/base_pg_helper.rb'
- 'files/gitlab-cookbooks/gitlab/libraries/rails_migration_helper.rb'
- 'files/gitlab-ctl-commands/lib/postgresql/password_hash.rb'
# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Fips/OpenSSL:
Exclude:
- 'files/gitlab-cookbooks/letsencrypt/recipes/enable.rb'
- 'files/gitlab-cookbooks/package/libraries/certificate_helper.rb'
# Offense count: 2
Fips/SHA1:
Exclude:
- 'files/gitlab-cookbooks/letsencrypt/recipes/enable.rb'
- 'files/gitlab-cookbooks/package/libraries/certificate_helper.rb'
# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowAliasSyntax, AllowedMethods.
# AllowedMethods: alias_method, public, protected, private
Layout/EmptyLinesAroundAttributeAccessor:
Exclude:
- 'files/gitlab-cookbooks/package/libraries/helpers/logging_helper.rb'
# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: empty_lines, no_empty_lines
Layout/EmptyLinesAroundBlockBody:
Exclude:
- 'files/gitlab-ctl-commands-ee/get_postgresql_primary.rb'
# Offense count: 5
# This cop supports safe autocorrection (--autocorrect).
Layout/SpaceAroundMethodCallOperator:
Exclude:
- 'spec/chef/cookbooks/package/libraries/helpers/logging_helper_spec.rb'
- 'spec/chef/cookbooks/postgresql/recipes/postgresql_spec.rb'
- 'spec/chef/gitlab-ctl-commands-ee/lib/postgresql/ee_spec.rb'
# Offense count: 3
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
# SupportedStylesForExponentOperator: space, no_space
Layout/SpaceAroundOperators:
Exclude:
- 'files/gitlab-ctl-commands/lib/gitlab_ctl/upgrade_check.rb'
- 'files/gitlab-ctl-commands/lib/gitlab_ctl/util.rb'
# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowForAlignment.
Layout/SpaceBeforeFirstArg:
Exclude:
- 'files/gitlab-ctl-commands/pg-upgrade.rb'
# Offense count: 18
Lint/BinaryOperatorWithIdenticalOperands:
Exclude:
- 'spec/chef/cookbooks/gitlab/recipes/gitlab-rails/gitlab_yml/cron_jobs_spec.rb'
- 'spec/chef/cookbooks/gitlab/recipes/gitlab-rails_spec.rb'
- 'spec/chef/cookbooks/gitlab/recipes/gitlab-workhorse_spec.rb'
- 'spec/chef/cookbooks/pgbouncer/libraries/pgbouncer_helper_spec.rb'
- 'spec/lib/gitlab/version_spec.rb'
# Offense count: 11
# Configuration parameters: AllowedMethods.
# AllowedMethods: enums
Lint/ConstantDefinitionInBlock:
Exclude:
- 'files/gitlab-ctl-commands/upgrade.rb'
- 'spec/chef/cookbooks/package/libraries/secrets_helper_spec.rb'
- 'spec/chef/gitlab-ctl-commands/gitlab_ctl_spec.rb'
- 'spec/chef/support/shared_examples/geo_promotion_command_accepts_option_shared_examples.rb'
- 'spec/chef/support/shared_examples/gitlab_geo_promotion_commands_shared_examples.rb'
- 'spec/lib/gitlab/build/image_spec.rb'
# Offense count: 1
Lint/DuplicateMethods:
Exclude:
- 'files/gitlab-ctl-commands/lib/postgresql/pgpass.rb'
# Offense count: 2
Lint/MixedRegexpCaptureTypes:
Exclude:
- 'files/gitlab-cookbooks/gitlab/libraries/pg_version.rb'
- 'files/gitlab-ctl-commands/lib/gitlab_ctl/util.rb'
# Offense count: 2
# This cop supports unsafe autocorrection (--autocorrect-all).
Lint/NonDeterministicRequireOrder:
Exclude:
- 'spec/chef_helper.rb'
- 'spec/spec_helper.rb'
# Offense count: 3
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
Metrics/CyclomaticComplexity:
Max: 15
# Offense count: 2
# Configuration parameters: Max, CountKeywordArgs.
Metrics/ParameterLists:
MaxOptionalParameters: 6
# Offense count: 4
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
Metrics/PerceivedComplexity:
Max: 16
# Offense count: 90
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
Naming/FileName:
Enabled: false
# Offense count: 43
# Configuration parameters: ForbiddenDelimiters.
# ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
Naming/HeredocDelimiterNaming:
Enabled: false
# Offense count: 23
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
# NamePrefix: is_, has_, have_
# ForbiddenPrefixes: is_, has_, have_
# AllowedMethods: is_a?
# MethodDefinitionMacros: define_method, define_singleton_method
Naming/PredicateName:
Exclude:
- 'files/gitlab-cookbooks/gitlab/libraries/helpers/base_pg_helper.rb'
- 'files/gitlab-cookbooks/gitlab/libraries/helpers/pg_helper.rb'
- 'files/gitlab-cookbooks/gitlab/libraries/redis_helper.rb'
- 'files/gitlab-cookbooks/monitoring/libraries/prometheus_helper.rb'
- 'files/gitlab-cookbooks/package/libraries/certificate_helper.rb'
- 'files/gitlab-cookbooks/package/libraries/omnibus_helper.rb'
- 'lib/gitlab/build/check.rb'
# Offense count: 2
# Configuration parameters: MinSize.
Performance/CollectionLiteralInLoop:
Exclude:
- 'files/gitlab-cookbooks/gitlab/libraries/helpers/gitlab_rails.rb'
- 'files/gitlab-cookbooks/pgbouncer/libraries/pgbouncer_helper.rb'
# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Performance/Count:
Exclude:
- 'files/gitlab-cookbooks/package/libraries/config/roles/default.rb'
# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Performance/Detect:
Exclude:
- 'files/gitlab-cookbooks/gitlab/libraries/patroni.rb'
# Offense count: 6
# This cop supports unsafe autocorrection (--autocorrect-all).
Performance/StringInclude:
Exclude:
- 'config/software/gnupg.rb'
- 'config/software/jemalloc.rb'
- 'config/software/libtiff.rb'
- 'files/gitlab-cookbooks/package/libraries/helpers/redhat_helper.rb'
- 'files/gitlab-ctl-commands/upgrade.rb'
# Offense count: 6
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: separated, grouped
Style/AccessorGrouping:
Exclude:
- 'files/gitlab-cookbooks/gitlab/libraries/helpers/base_pg_helper.rb'
- 'files/gitlab-cookbooks/gitlab/libraries/helpers/pg_status_helper.rb'
# Offense count: 3
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/ArrayCoercion:
Exclude:
- 'files/gitlab-cookbooks/package/libraries/helpers/services_helper.rb'
# Offense count: 8
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/CaseLikeIf:
Exclude:
- 'files/gitlab-cookbooks/monitoring/libraries/prometheus_helper.rb'
- 'files/gitlab-cookbooks/package/libraries/deprecations.rb'
- 'files/gitlab-ctl-commands-ee/lib/geo/replication_toggle_command.rb'
- 'files/gitlab-ctl-commands/pg-upgrade.rb'
- 'lib/gitlab/license/analyzer.rb'
# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
# AllowedMethods: ==, equal?, eql?
Style/ClassEqualityComparison:
Exclude:
- 'files/gitlab-cookbooks/package/libraries/config_mash.rb'
# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/Dir:
Exclude:
- 'files/gitlab-cookbooks/solo.rb'
# Offense count: 718
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: always, always_true, never
Style/FrozenStringLiteralComment:
Enabled: false
# Offense count: 26
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/GlobalStdStream:
Exclude:
- 'files/gitlab-ctl-commands-ee/lib/geo/promotion_preflight_checks.rb'
- 'files/gitlab-ctl-commands-ee/lib/geo/replication.rb'
- 'files/gitlab-ctl-commands/lib/gitlab_ctl/util.rb'
- 'lib/gitlab/build/trigger.rb'
- 'spec/chef/gitlab-ctl-commands-ee/lib/geo/promotion_preflight_checks_spec.rb'
- 'spec/chef/gitlab-ctl-commands-ee/lib/geo/replication_spec.rb'
- 'spec/chef/gitlab-ctl-commands/lib/gitlab_ctl_backup_spec.rb'
- 'spec/chef/gitlab-ctl-commands/lib/util_spec.rb'
# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/HashTransformKeys:
Exclude:
- 'lib/gitlab/deployer_helper.rb'
# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/HashTransformValues:
Exclude:
- 'files/gitlab-cookbooks/gitlab/libraries/helpers/base_pg_helper.rb'
# Offense count: 3
# This cop supports safe autocorrection (--autocorrect).
Style/HashTransformation:
Exclude:
- 'files/gitlab-cookbooks/gitaly/libraries/gitaly.rb'
- 'files/gitlab-cookbooks/gitlab/libraries/nginx.rb'
- 'lib/gitlab/deployer_helper.rb'
# Offense count: 43
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedOctalStyle.
# SupportedOctalStyles: zero_with_o, zero_only
Style/NumericLiteralPrefix:
Enabled: false
# Offense count: 366
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: PreferredDelimiters.
Style/PercentLiteralDelimiters:
Enabled: false
# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantAssignment:
Exclude:
- 'files/gitlab-cookbooks/gitlab/libraries/redis_helper.rb'
# Offense count: 5
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantBegin:
Exclude:
- 'files/gitlab-ctl-commands/lib/gitlab_ctl/pg_upgrade.rb'
- 'files/gitlab-ctl-commands/lib/postgresql.rb'
- 'files/gitlab-ctl-commands/pg-upgrade.rb'
# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantConditional:
Exclude:
- 'files/gitlab-cookbooks/mattermost/recipes/enable.rb'
- 'files/gitlab-ctl-commands-ee/lib/geo/replication.rb'
# Offense count: 63
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantFileExtensionInRequire:
Enabled: false
# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantRegexpCharacterClass:
Exclude:
- 'spec/chef_helper.rb'
# Offense count: 58
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantRegexpEscape:
Exclude:
- 'files/gitlab-cookbooks/gitlab/libraries/registry.rb'
- 'files/gitlab-cookbooks/package/libraries/helpers/redhat_helper.rb'
- 'spec/chef/cookbooks/gitlab/recipes/add_trusted_certs_spec.rb'
- 'spec/chef/cookbooks/gitlab/recipes/gitlab-workhorse_spec.rb'
- 'spec/chef/cookbooks/gitlab/recipes/mailroom_spec.rb'
- 'spec/chef/cookbooks/gitlab/recipes/puma_spec.rb'
- 'spec/chef/cookbooks/gitlab/recipes/sidekiq_spec.rb'
- 'spec/chef/cookbooks/registry/recipes/registry_spec.rb'
- 'spec/chef_helper.rb'
# Offense count: 315
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
# SupportedStyles: slashes, percent_r, mixed
Style/RegexpLiteral:
Enabled: false
# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
# AllowedMethods: present?, blank?, presence, try, try!
Style/SafeNavigation:
Exclude:
- 'files/gitlab-cookbooks/gitlab/libraries/redis_helper.rb'
# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/SlicingWithRange:
Exclude:
- 'files/gitlab-cookbooks/patroni/recipes/enable.rb'
# Offense count: 3
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowModifier.
Style/SoleNestedConditional:
Exclude:
- 'files/gitlab-ctl-commands/lib/gitlab_ctl/upgrade_check.rb'
- 'files/gitlab-ctl-commands/pg-upgrade.rb'
- 'lib/gitlab/version.rb'
# Offense count: 34
# This cop supports safe autocorrection (--autocorrect).
Style/StderrPuts:
Exclude:
- 'files/gitlab-cookbooks/package/libraries/handlers/gitlab.rb'
- 'files/gitlab-ctl-commands-ee/lib/pgbouncer.rb'
- 'files/gitlab-ctl-commands-ee/pgbouncer.rb'
- 'files/gitlab-ctl-commands/letsencrypt.rb'
- 'files/gitlab-ctl-commands/lib/gitlab_ctl/pg_upgrade.rb'
- 'files/gitlab-ctl-commands/lib/postgresql/replication.rb'
- 'files/gitlab-ctl-commands/pg-upgrade.rb'
# Offense count: 8
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Mode.
Style/StringConcatenation:
Exclude:
- 'config/software/runit.rb'
- 'files/gitlab-cookbooks/gitlab-pages/libraries/gitlab_pages.rb'
- 'files/gitlab-cookbooks/gitlab/libraries/redis_uri.rb'
- 'files/gitlab-cookbooks/package/libraries/certificate_helper.rb'
- 'files/gitlab-cookbooks/package/libraries/deprecations.rb'
- 'lib/gitlab/package_repository.rb'
- 'support/merge-reports'
# Offense count: 2
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, IgnoredMethods, AllowComments.
# AllowedMethods: respond_to, define_method
Style/SymbolProc:
Exclude:
- 'lib/gitlab/linker_helper.rb'
# Offense count: 49
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyleForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
Style/TrailingCommaInArrayLiteral:
Enabled: false
# Offense count: 188
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyleForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
Style/TrailingCommaInHashLiteral:
Enabled: false
# Offense count: 23
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, MinSize, WordRegex.
# SupportedStyles: percent, brackets
Style/WordArray:
Exclude:
- 'files/gitlab-cookbooks/gitlab/libraries/nginx.rb'
- 'files/gitlab-cookbooks/package/libraries/config/services.rb'
- 'files/gitlab-cookbooks/package/libraries/deprecations.rb'
- 'files/gitlab-ctl-commands-ee/lib/postgresql/ee.rb'
- 'files/gitlab-ctl-commands/lib/praefect.rb'
- 'lib/gitlab/ohai_helper.rb'
- 'spec/chef/cookbooks/gitlab/recipes/gitlab-rails/gitlab_yml/omniauth_spec.rb'
- 'spec/chef/cookbooks/gitlab/recipes/nginx_spec.rb'
- 'spec/chef/cookbooks/logrotate/recipes/folders_and_configs_spec.rb'
- 'spec/chef/cookbooks/monitoring/recipes/prometheus_spec.rb'
- 'spec/chef/cookbooks/package/libraries/deprecations_spec.rb'
- 'spec/chef/gitlab-ctl-commands/lib/praefect_spec.rb'
# Offense count: 806
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
# URISchemes: http, https
Layout/LineLength:
Max: 410