Skip to content

Commit

Permalink
Enable all cops, but explicitly opt each file out (mongodb#5608)
Browse files Browse the repository at this point in the history
The idea here being that we can go in and opt each file in as we work on it
  • Loading branch information
jamis authored Apr 19, 2023
1 parent 344ee2d commit dc80853
Show file tree
Hide file tree
Showing 1,008 changed files with 1,019 additions and 20 deletions.
26 changes: 13 additions & 13 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
inherit_from: .rubocop_todo.yml

require:
- rubocop-performance
- rubocop-rails
Expand All @@ -10,46 +8,48 @@ AllCops:
TargetRubyVersion: 2.6
NewCops: enable
Exclude:
- 'spec/shared/lib/mrss/**/*'
- 'spec/shared/**/*'
- 'vendor/**/*'
- 'tmp/**/*'
- 'test-apps/**/*'

# -----------------------------------
# TODO: Enable and fix the cops below
# -----------------------------------

Gemspec:
Enabled: false
Enabled: true

Layout:
Enabled: false
Enabled: true

Lint:
Enabled: false
Enabled: true

Metrics:
Enabled: false
Enabled: true

Naming:
Enabled: false
Enabled: true

Performance:
Enabled: false
Enabled: true

Rake:
Enabled: false
Enabled: true

Rails:
Enabled: false
Enabled: true

RSpec:
Enabled: false
Enabled: true

Security:
Exclude:
- 'spec/**/*'

Style:
Enabled: false
Enabled: true

# --------------------------------------
# Cops below this line set intentionally
Expand Down
7 changes: 0 additions & 7 deletions .rubocop_todo.yml

This file was deleted.

1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# rubocop:todo all
source 'https://rubygems.org'

gemspec
Expand Down
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

require "bundler"
require "bundler/gem_tasks"
Expand Down
1 change: 1 addition & 0 deletions examples/mongoid_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

require 'mongoid'
require 'mongoid/support/query_counter'
Expand Down
1 change: 1 addition & 0 deletions gemfiles/bson_master.gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# rubocop:todo all
source "https://rubygems.org"
gemspec path: '..'

Expand Down
1 change: 1 addition & 0 deletions gemfiles/bson_min.gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# rubocop:todo all
source "https://rubygems.org"
gemspec path: '..'

Expand Down
1 change: 1 addition & 0 deletions gemfiles/driver_master.gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# rubocop:todo all
source "https://rubygems.org"

gem 'bson', git: "https://github.com/mongodb/bson-ruby", branch: '4-stable'
Expand Down
1 change: 1 addition & 0 deletions gemfiles/driver_master_jruby.gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# rubocop:todo all
source "https://rubygems.org"

# Due to https://github.com/jruby/jruby/issues/5292 /
Expand Down
1 change: 1 addition & 0 deletions gemfiles/driver_min.gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# rubocop:todo all
source "https://rubygems.org"

gem 'mongo', git: "https://github.com/mongodb/mongo-ruby-driver", branch: '2.18-stable'
Expand Down
1 change: 1 addition & 0 deletions gemfiles/driver_min_jruby.gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# rubocop:todo all
source "https://rubygems.org"

# Due to https://github.com/jruby/jruby/issues/5292 /
Expand Down
1 change: 1 addition & 0 deletions gemfiles/driver_oldstable.gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# rubocop:todo all
source "https://rubygems.org"

gem 'mongo', git: "https://github.com/mongodb/mongo-ruby-driver", branch: '2.18-stable'
Expand Down
1 change: 1 addition & 0 deletions gemfiles/driver_oldstable_jruby.gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# rubocop:todo all
source "https://rubygems.org"

# Due to https://github.com/jruby/jruby/issues/5292 /
Expand Down
1 change: 1 addition & 0 deletions gemfiles/driver_stable.gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# rubocop:todo all
source "https://rubygems.org"

gem 'mongo', git: "https://github.com/mongodb/mongo-ruby-driver", branch: '2.18-stable'
Expand Down
1 change: 1 addition & 0 deletions gemfiles/driver_stable_jruby.gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# rubocop:todo all
source "https://rubygems.org"

# Due to https://github.com/jruby/jruby/issues/5292 /
Expand Down
1 change: 1 addition & 0 deletions gemfiles/i18n-1.0.gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# rubocop:todo all
source "https://rubygems.org"

gem 'actionpack'
Expand Down
1 change: 1 addition & 0 deletions gemfiles/rails-5.2.gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# rubocop:todo all
source 'https://rubygems.org'

gem 'actionpack', '~> 5.2'
Expand Down
1 change: 1 addition & 0 deletions gemfiles/rails-6.0.gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# rubocop:todo all
source 'https://rubygems.org'

gem 'actionpack', '~> 6.0'
Expand Down
1 change: 1 addition & 0 deletions gemfiles/rails-6.1.gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# rubocop:todo all
source 'https://rubygems.org'

gem 'actionpack', '~> 6.1'
Expand Down
1 change: 1 addition & 0 deletions gemfiles/rails-7.0.gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# rubocop:todo all
source 'https://rubygems.org'

gem 'actionpack', '~> 7.0'
Expand Down
1 change: 1 addition & 0 deletions gemfiles/rails-master.gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# rubocop:todo all
source 'https://rubygems.org'

gem 'actionpack', git: 'https://github.com/rails/rails'
Expand Down
1 change: 1 addition & 0 deletions gemfiles/standard.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# rubocop:todo all
def standard_dependencies
gem 'rake'

Expand Down
1 change: 1 addition & 0 deletions lib/mongoid.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

require "forwardable"
require "time"
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

require 'mongoid/association/accessors'
require 'mongoid/association/builders'
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/accessors.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/bindable.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/builders.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/constrainable.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/depending.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/eager.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/eager_loadable.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

require "mongoid/association/eager"

Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/embedded.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

require 'mongoid/association/embedded/cyclic'
require 'mongoid/association/embedded/eager'
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/embedded/batchable.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/embedded/cyclic.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/embedded/eager.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/embedded/embedded_in.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

require 'mongoid/association/embedded/embedded_in/binding'
require 'mongoid/association/embedded/embedded_in/buildable'
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/embedded/embedded_in/binding.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/embedded/embedded_in/buildable.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/embedded/embedded_in/proxy.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/embedded/embeds_many.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

require 'mongoid/association/embedded/embeds_many/binding'
require 'mongoid/association/embedded/embeds_many/buildable'
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/embedded/embeds_many/binding.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/embedded/embeds_many/buildable.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/embedded/embeds_many/proxy.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

require 'mongoid/association/embedded/batchable'

Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/embedded/embeds_one.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

require 'mongoid/association/embedded/embeds_one/binding'
require 'mongoid/association/embedded/embeds_one/buildable'
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/embedded/embeds_one/binding.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/embedded/embeds_one/buildable.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/embedded/embeds_one/proxy.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/macros.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/many.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/marshalable.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/nested.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

require 'mongoid/association/nested/nested_buildable'
require 'mongoid/association/nested/many'
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/nested/many.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/nested/nested_buildable.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/nested/one.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/one.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/options.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/proxy.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

require "mongoid/association/marshalable"

Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/referenced.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

require 'mongoid/association/referenced/auto_save'
require 'mongoid/association/referenced/counter_cache'
Expand Down
1 change: 1 addition & 0 deletions lib/mongoid/association/referenced/auto_save.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
# rubocop:todo all

module Mongoid
module Association
Expand Down
Loading

0 comments on commit dc80853

Please sign in to comment.