require: - rubocop-capybara - rubocop-rails - rubocop-rspec - rubocop-rspec_rails inherit_from: - .rubocop_todo.yml AllCops: DisplayCopNames: true TargetRubyVersion: 2.7 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" - "app/views/catalog/_document.atom.builder" - "lib/railties/blacklight.rake" - "tasks/blacklight.rake" - "spec/**/*" Metrics/ClassLength: Exclude: - "lib/blacklight/configuration.rb" - "lib/blacklight/search_builder.rb" - "lib/blacklight/search_state.rb" - "lib/blacklight/search_state/filter_field.rb" - "app/presenters/blacklight/document_presenter.rb" Layout/LineLength: Max: 200 Exclude: - 'spec/**/*' Metrics/ModuleLength: Exclude: - 'app/controllers/concerns/blacklight/catalog.rb' - 'lib/blacklight/solr/search_builder_behavior.rb' Metrics/AbcSize: Exclude: - "lib/blacklight/search_state/filter_field.rb" Naming/HeredocDelimiterNaming: Enabled: false Naming/MethodParameterName: AllowedNames: - id - q - as - of - by Naming/PredicateName: ForbiddenPrefixes: - is_ Rails: Enabled: true Rails/ApplicationMailer: Enabled: false # Offense count: 1 # Configuration parameters: IgnoredMetadata. RSpec/DescribeClass: Exclude: - 'spec/features/**/*' - 'spec/lib/tasks/**/*' - 'spec/routing/**/*' - 'spec/views/**/*' # 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 Style/HashTransformKeys: Enabled: true Style/HashTransformValues: Enabled: true Style/RedundantRegexpCharacterClass: Enabled: true Style/RedundantRegexpEscape: Enabled: true Style/SlicingWithRange: Enabled: true Rails/ContentTag: Enabled: false