require: - rubocop-rspec - rubocop-rails inherit_from: - .rubocop_todo.yml AllCops: DisplayCopNames: true TargetRubyVersion: 2.5 Exclude: - "lib/generators/blacklight/templates/**/*" - "blacklight.gemspec" # engine_cart block includes conditional, not duplication Bundler/DuplicatedGem: Exclude: - 'Gemfile' # engine_cart block is following default Rails order Bundler/OrderedGems: Exclude: - 'Gemfile' Layout/IndentationConsistency: EnforcedStyle: normal Metrics/BlockLength: Exclude: - "app/views/catalog/index.json.jbuilder" - "lib/railties/blacklight.rake" - "tasks/blacklight.rake" - "spec/**/*" Metrics/ClassLength: Exclude: - "lib/blacklight/configuration.rb" Layout/LineLength: Max: 200 Exclude: - 'spec/**/*' Naming/HeredocDelimiterNaming: Enabled: false Naming/MethodParameterName: AllowedNames: - id - q Naming/PredicateName: ForbiddenPrefixes: - is_ Rails: Enabled: true # https://github.com/rubocop-hq/rubocop/issues/6439 Style/AccessModifierDeclarations: Enabled: false Style/MissingRespondToMissing: Exclude: - 'lib/blacklight/nested_open_struct_with_hash_access.rb' Style/StringLiterals: Enabled: false Style/MethodDefParentheses: Enabled: false Layout/EmptyLinesAroundAttributeAccessor: Enabled: true Layout/SpaceAroundMethodCallOperator: Enabled: true Lint/DeprecatedOpenSSLConstant: Enabled: true Lint/MixedRegexpCaptureTypes: Enabled: true Lint/RaiseException: Enabled: true Lint/StructNewOverride: Enabled: true Style/ExponentialNotation: Enabled: true Style/HashEachMethods: Enabled: true Exclude: - 'spec/services/blacklight/search_service_spec.rb' Style/HashTransformKeys: Enabled: true Style/HashTransformValues: Enabled: true Style/RedundantRegexpCharacterClass: Enabled: true Style/RedundantRegexpEscape: Enabled: true Style/SlicingWithRange: Enabled: true