Browse Source

Regen rubocop-todo without Max shadowing (#24076)

closed-social-glitch-2
Nick Schonning 1 year ago
committed by GitHub
parent
commit
aa947a143b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2201 additions and 250 deletions
  1. +0
    -10
      .rubocop.yml
  2. +2201
    -238
      .rubocop_todo.yml
  3. +0
    -2
      lib/mastodon/media_cli.rb

+ 0
- 10
.rubocop.yml View File

@ -32,7 +32,6 @@ Layout/FirstHashElementIndentation:
EnforcedStyle: consistent
Layout/LineLength:
Max: 140 # RuboCop default 120
AllowedPatterns:
# Allow comments to be long lines
- !ruby/regexp / \# .*$/
@ -47,13 +46,11 @@ Lint/UselessAccessModifier:
- class_methods
Metrics/AbcSize:
Max: 34 # RuboCop default 17
Exclude:
- 'lib/**/*cli*.rb'
- db/*migrate/**/*
Metrics/BlockLength:
Max: 55 # Default 25
CountAsOne: [array, heredoc]
Exclude:
- 'lib/mastodon/*_cli.rb'
@ -63,30 +60,23 @@ Metrics/BlockNesting:
- 'lib/mastodon/*_cli.rb'
Metrics/ClassLength:
Max: 500 # Default 100
CountAsOne: [array, heredoc]
Exclude:
- 'lib/mastodon/*_cli.rb'
Metrics/CyclomaticComplexity:
Max: 12 # Default 7
Exclude:
- lib/mastodon/*cli*.rb
- db/*migrate/**/*
Metrics/MethodLength:
Max: 25 # RuboCop default 10
CountAsOne: [array, heredoc]
Exclude:
- 'lib/mastodon/*_cli.rb'
Metrics/ModuleLength:
Max: 200 # Default 100
CountAsOne: [array, heredoc]
Metrics/PerceivedComplexity:
Max: 16 # RuboCop default 8
Rails/HttpStatus:
EnforcedStyle: numeric

+ 2201
- 238
.rubocop_todo.yml
File diff suppressed because it is too large
View File


+ 0
- 2
lib/mastodon/media_cli.rb View File

@ -35,7 +35,6 @@ module Mastodon
follow status. By default, only accounts that are not followed by or
following anyone locally are pruned.
DESC
# rubocop:disable Metrics/PerceivedComplexity
def remove
if options[:prune_profiles] && options[:remove_headers]
say('--prune-profiles and --remove-headers should not be specified simultaneously', :red, true)
@ -224,7 +223,6 @@ module Mastodon
say("Removed #{removed} orphans (approx. #{number_to_human_size(reclaimed_bytes)})#{dry_run}", :green, true)
end
# rubocop:enable Metrics/PerceivedComplexity
option :account, type: :string
option :domain, type: :string

Loading…
Cancel
Save