require:
  - rubocop-minitest
  - rubocop-packaging
  - rubocop-performance
  - rubocop-rake
inherit_gem:
  rubocop-shopify: rubocop.yml
inherit_from: .rubocop_todo.yml

AllCops:
  NewCops: enable
  Exclude:
    - 'lib/nokogiri/css/parser.rb' # generated by racc
    - 'lib/nokogiri/css/tokenizer.rb' # generated by rex
    - 'lib/nokogiri/jruby/nokogiri_jars.rb' # generated by jar-dependencies
    - 'test/_test_pattern_matching.rb' # until TargetRubyVersion >= 3.0
  TargetRubyVersion: "3.0"

Metrics/BlockNesting:
  Exclude:
    - ext/nokogiri/extconf.rb
    - scripts/**
    - test/html5/test_tree_construction.rb

Metrics/CollectionLiteralLength:
  Exclude:
    - nokogiri.gemspec

Minitest/EmptyLineBeforeAssertionMethods:
  Enabled: false

Naming/FileName:
  Exclude:
    - rakelib/**

Naming/MethodName:
  Enabled: false

Performance/CollectionLiteralInLoop:
  Exclude:
    - test/**/*

Performance/StringIdentifierArgument:
  Exclude:
    - test/**/*
