Skip to content
Snippets Groups Projects
Select Git revision
  • ac59d6f19f00f1503343cd587c4238dc0038127a
  • main default protected
  • mathstodon-4.3.6
  • mathstodon-4.3.x
  • mathstodon-4.2.15
  • mathstodon-4.2.10
  • mathstodon-4.2.7
  • mathstodon-4.2.6
  • v4.2.5
  • v4.2.2
  • mathstodon-4.2.5
  • mathstodon-4.2
  • mathstodon-4.1
  • mastodon-4.1.3
  • v4.1.3
  • v4.1.0-diff
  • mathstodon-4.1.0
  • mastodon-v4.1.0
  • v4.0.2
  • mathstodon-4.0.2
  • mathstodon-3.5.3
  • v4.0.0rc3
  • v4.0.0rc2
  • v4.0.0rc1
  • v3.5.3
  • v3.4.8
  • v3.5.2
  • v3.5.1
  • v3.4.7
  • v3.3.3
  • v3.5.0
  • v3.5.0rc3
  • v3.5.0rc2
  • v3.5.0rc1
  • v3.4.6
  • v3.3.2
  • v3.3.1
  • v3.4.5
  • v3.4.4
  • v3.4.3
  • v3.4.2
41 results

.rubocop.yml

Blame
  • user avatar
    Nick Schonning authored and GitHub committed
    ac59d6f1
    History
    .rubocop.yml 2.22 KiB
    inherit_from: .rubocop_todo.yml
    
    inherit_mode:
      merge:
        - Exclude
    
    require:
      - rubocop-rails
      - rubocop-rspec
      - rubocop-performance
    
    AllCops:
      TargetRubyVersion: 2.7
      DisplayCopNames: true
      DisplayStyleGuide: true
      ExtraDetails: true
      UseCache: true
      CacheRootDirectory: tmp
      NewCops: enable
      Exclude:
        - db/schema.rb
        - 'app/views/**/*'
        - 'config/**/*'
        - 'bin/*'
        - 'Rakefile'
        - 'node_modules/**/*'
        - 'Vagrantfile'
        - 'vendor/**/*'
        - 'lib/json_ld/*'
        - 'lib/templates/**/*'
    
    Layout/FirstHashElementIndentation:
      EnforcedStyle: consistent
    
    Layout/LineLength:
      Max: 140 # RuboCop default 120
      AllowedPatterns:
        # Allow comments to be long lines
        - !ruby/regexp / \# .*$/
        - !ruby/regexp /^\# .*$/
      Exclude:
        - lib/**/*cli*.rb
        - db/*migrate/**/*
        - db/seeds/**/*
    
    Lint/UselessAccessModifier:
      ContextCreatingMethods:
        - 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'
    
    Metrics/BlockNesting:
      Exclude:
        - '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/Exit:
      Exclude:
        - 'lib/mastodon/*_cli.rb'
        - 'lib/mastodon/cli_helper.rb'
        - 'lib/cli.rb'
    
    Style/Copyright:
      Enabled: false
      AutocorrectNotice:
    
    Style/HashSyntax:
      EnforcedStyle: ruby19_no_mixed_keys
    
    Style/NumericLiterals:
      AllowedPatterns:
        - \d{4}_\d{2}_\d{2}_\d{6} # For DB migration date version number readability
    
    Style/PercentLiteralDelimiters:
      PreferredDelimiters:
        '%i': '()'
        '%w': '()'
    
    Style/TrailingCommaInArrayLiteral:
      EnforcedStyleForMultiline: 'comma'
    
    Style/TrailingCommaInHashLiteral:
      EnforcedStyleForMultiline: 'comma'