rubocop-isucon 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/gh-pages.yml +44 -0
- data/.github/workflows/test.yml +91 -0
- data/.gitignore +13 -0
- data/.rspec +3 -0
- data/.rubocop.yml +43 -0
- data/.yardopts +7 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile +8 -0
- data/LICENSE.txt +21 -0
- data/README.md +108 -0
- data/Rakefile +35 -0
- data/benchmark/README.md +69 -0
- data/benchmark/memorize.rb +86 -0
- data/benchmark/parse_table.rb +103 -0
- data/benchmark/shell.rb +26 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/config/default.yml +83 -0
- data/config/enable-only-performance.yml +30 -0
- data/gemfiles/activerecord_6_1.gemfile +14 -0
- data/gemfiles/activerecord_7_0.gemfile +14 -0
- data/lib/rubocop/cop/isucon/correctors/mysql2_n_plus_one_query_corrector/correctable_methods.rb +66 -0
- data/lib/rubocop/cop/isucon/correctors/mysql2_n_plus_one_query_corrector/replace_methods.rb +127 -0
- data/lib/rubocop/cop/isucon/correctors/mysql2_n_plus_one_query_corrector.rb +112 -0
- data/lib/rubocop/cop/isucon/mixin/database_methods.rb +59 -0
- data/lib/rubocop/cop/isucon/mixin/mysql2_xquery_methods.rb +176 -0
- data/lib/rubocop/cop/isucon/mixin/sinatra_methods.rb +37 -0
- data/lib/rubocop/cop/isucon/mysql2/join_without_index.rb +100 -0
- data/lib/rubocop/cop/isucon/mysql2/many_join_table.rb +86 -0
- data/lib/rubocop/cop/isucon/mysql2/n_plus_one_query.rb +179 -0
- data/lib/rubocop/cop/isucon/mysql2/prepare_execute.rb +136 -0
- data/lib/rubocop/cop/isucon/mysql2/select_asterisk.rb +171 -0
- data/lib/rubocop/cop/isucon/mysql2/where_without_index.rb +105 -0
- data/lib/rubocop/cop/isucon/shell/backtick.rb +36 -0
- data/lib/rubocop/cop/isucon/shell/system.rb +36 -0
- data/lib/rubocop/cop/isucon/sinatra/disable_logging.rb +83 -0
- data/lib/rubocop/cop/isucon/sinatra/logger.rb +52 -0
- data/lib/rubocop/cop/isucon/sinatra/rack_logger.rb +58 -0
- data/lib/rubocop/cop/isucon/sinatra/serve_static_file.rb +73 -0
- data/lib/rubocop/cop/isucon_cops.rb +20 -0
- data/lib/rubocop/isucon/database_connection.rb +42 -0
- data/lib/rubocop/isucon/gda/client.rb +184 -0
- data/lib/rubocop/isucon/gda/gda_ext.rb +119 -0
- data/lib/rubocop/isucon/gda/join_condition.rb +25 -0
- data/lib/rubocop/isucon/gda/join_operand.rb +46 -0
- data/lib/rubocop/isucon/gda/node_location.rb +42 -0
- data/lib/rubocop/isucon/gda/node_patcher.rb +101 -0
- data/lib/rubocop/isucon/gda/where_condition.rb +73 -0
- data/lib/rubocop/isucon/gda/where_operand.rb +32 -0
- data/lib/rubocop/isucon/gda.rb +28 -0
- data/lib/rubocop/isucon/inject.rb +20 -0
- data/lib/rubocop/isucon/memorize_methods.rb +38 -0
- data/lib/rubocop/isucon/version.rb +7 -0
- data/lib/rubocop/isucon.rb +20 -0
- data/lib/rubocop-isucon.rb +16 -0
- data/rubocop-isucon.gemspec +52 -0
- metadata +286 -0
@@ -0,0 +1,73 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Isucon
|
5
|
+
module GDA
|
6
|
+
# response of {RuboCop::Isucon::GDA::Client#where_conditions}
|
7
|
+
class WhereCondition
|
8
|
+
# @!attribute [rw] operator
|
9
|
+
# @return [String]
|
10
|
+
attr_accessor :operator
|
11
|
+
|
12
|
+
# @!attribute [rw] operands
|
13
|
+
# @return [Array<RuboCop::Isucon::GDA::WhereOperand>]
|
14
|
+
attr_accessor :operands
|
15
|
+
|
16
|
+
# @param operator [String]
|
17
|
+
# @param operands [Array<RuboCop::Isucon::GDA::WhereOperand>]
|
18
|
+
def initialize(operator: nil, operands: [])
|
19
|
+
@operator = operator
|
20
|
+
@operands = operands
|
21
|
+
end
|
22
|
+
|
23
|
+
# @return [String,nil]
|
24
|
+
def column_operand
|
25
|
+
operand0_value = operands[0].value
|
26
|
+
|
27
|
+
return operand0_value if operands.count == 1
|
28
|
+
|
29
|
+
operand1_value = operands[1].value
|
30
|
+
|
31
|
+
operand0_type = operand_type(operand0_value)
|
32
|
+
operand1_type = operand_type(operand1_value)
|
33
|
+
|
34
|
+
return operand0_value if operand0_type == :column || operand1_type == :value
|
35
|
+
return operand1_value if operand1_type == :column || operand0_type == :value
|
36
|
+
|
37
|
+
nil
|
38
|
+
end
|
39
|
+
|
40
|
+
# @return [String,nil]
|
41
|
+
def value_operand
|
42
|
+
return nil if operands.count == 1
|
43
|
+
|
44
|
+
operand0_value = operands[0].value
|
45
|
+
operand1_value = operands[1].value
|
46
|
+
|
47
|
+
operand0_type = operand_type(operand0_value)
|
48
|
+
operand1_type = operand_type(operand1_value)
|
49
|
+
|
50
|
+
return operand0_value if operand0_type == :value || operand1_type == :column
|
51
|
+
return operand1_value if operand1_type == :value || operand0_type == :column
|
52
|
+
|
53
|
+
nil
|
54
|
+
end
|
55
|
+
|
56
|
+
private
|
57
|
+
|
58
|
+
# @param operand [String]
|
59
|
+
# @return [Symbol]
|
60
|
+
def operand_type(operand)
|
61
|
+
case operand
|
62
|
+
when PRACEHOLDER, /^'.+'$/, /^[0-9.]+$/
|
63
|
+
:value
|
64
|
+
when /^[A-Za-z0-9_$]*$/
|
65
|
+
:column
|
66
|
+
else
|
67
|
+
:unknown
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Isucon
|
5
|
+
module GDA
|
6
|
+
# response of {RuboCop::Isucon::GDA::Client#where_conditions}
|
7
|
+
class WhereOperand
|
8
|
+
# @!attribute [rw] value
|
9
|
+
# @return [String]
|
10
|
+
attr_accessor :value
|
11
|
+
|
12
|
+
# @!attribute [rw] node
|
13
|
+
# @return [GDA::Nodes::Expr]
|
14
|
+
attr_accessor :node
|
15
|
+
|
16
|
+
# @param value [String]
|
17
|
+
# @param node [GDA::Nodes::Expr]
|
18
|
+
def initialize(value: nil, node: nil)
|
19
|
+
@value = value
|
20
|
+
@node = node
|
21
|
+
end
|
22
|
+
|
23
|
+
# @param other [RuboCop::Isucon::GDA::WhereOperand]
|
24
|
+
# @return [Boolean]
|
25
|
+
def ==(other)
|
26
|
+
other.is_a?(WhereOperand) &&
|
27
|
+
value == other.value
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "gda/client"
|
4
|
+
require_relative "gda/gda_ext"
|
5
|
+
require_relative "gda/join_condition"
|
6
|
+
require_relative "gda/join_operand"
|
7
|
+
require_relative "gda/node_location"
|
8
|
+
require_relative "gda/node_patcher"
|
9
|
+
require_relative "gda/where_condition"
|
10
|
+
require_relative "gda/where_operand"
|
11
|
+
|
12
|
+
module RuboCop
|
13
|
+
module Isucon
|
14
|
+
# `GDA` helper classes
|
15
|
+
#
|
16
|
+
# @see https://github.com/tenderlove/gda
|
17
|
+
# @see https://gitlab.gnome.org/GNOME/libgda
|
18
|
+
module GDA
|
19
|
+
PRACEHOLDER = "0"
|
20
|
+
|
21
|
+
# @param sql [String]
|
22
|
+
# @return [String]
|
23
|
+
def self.normalize_sql(sql)
|
24
|
+
sql.tr("`", " ").gsub("?", PRACEHOLDER)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The original code is from https://github.com/rubocop-hq/rubocop-rspec/blob/master/lib/rubocop/rspec/inject.rb
|
4
|
+
# See https://github.com/rubocop-hq/rubocop-rspec/blob/master/MIT-LICENSE.md
|
5
|
+
module RuboCop
|
6
|
+
module Isucon
|
7
|
+
# Because RuboCop doesn't yet support plugins, we have to monkey patch in a
|
8
|
+
# bit of our configuration.
|
9
|
+
module Inject
|
10
|
+
def self.defaults!
|
11
|
+
path = CONFIG_DEFAULT.to_s
|
12
|
+
hash = ConfigLoader.send(:load_yaml_configuration, path)
|
13
|
+
config = Config.new(hash, path).tap(&:make_excludes_absolute)
|
14
|
+
puts "configuration from #{path}" if ConfigLoader.debug?
|
15
|
+
config = ConfigLoader.merge_with_default(config, path)
|
16
|
+
ConfigLoader.instance_variable_set(:@default_configuration, config)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Isucon
|
5
|
+
# Memorize helper
|
6
|
+
#
|
7
|
+
module MemorizeMethods
|
8
|
+
# Define memorize method
|
9
|
+
#
|
10
|
+
# @param method_name [String,Symbol]
|
11
|
+
#
|
12
|
+
# @example Usage
|
13
|
+
# extends RuboCop::Isucon::MemorizeMethods
|
14
|
+
#
|
15
|
+
# memorize :foo
|
16
|
+
#
|
17
|
+
# @example Generated followings
|
18
|
+
# def foo_with_cache
|
19
|
+
# @foo_with_cache ||= foo_without_cache
|
20
|
+
# end
|
21
|
+
# alias_method :foo_without_cache, :foo
|
22
|
+
# alias_method :foo, :foo_with_cache
|
23
|
+
def memorize(method_name)
|
24
|
+
class_eval <<~RUBY, __FILE__, __LINE__ + 1
|
25
|
+
# def foo_with_cache
|
26
|
+
# @foo_with_cache ||= foo_without_cache
|
27
|
+
# end
|
28
|
+
def #{method_name}_with_cache
|
29
|
+
@#{method_name}_with_cache ||= #{method_name}_without_cache
|
30
|
+
end
|
31
|
+
RUBY
|
32
|
+
|
33
|
+
alias_method "#{method_name}_without_cache", method_name
|
34
|
+
alias_method method_name, "#{method_name}_with_cache"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "isucon/version"
|
4
|
+
|
5
|
+
module RuboCop
|
6
|
+
# RuboCop Isucon project namespace
|
7
|
+
module Isucon
|
8
|
+
class Error < StandardError; end
|
9
|
+
|
10
|
+
# `Database` isn't configured in `.rubocop.yml`
|
11
|
+
class DatabaseConfigurationError < Error; end
|
12
|
+
|
13
|
+
# Your code goes here...
|
14
|
+
PROJECT_ROOT = Pathname.new(__dir__).parent.parent.expand_path.freeze
|
15
|
+
CONFIG_DEFAULT = PROJECT_ROOT.join("config", "default.yml").freeze
|
16
|
+
CONFIG = YAML.safe_load(CONFIG_DEFAULT.read).freeze
|
17
|
+
|
18
|
+
private_constant(:CONFIG_DEFAULT, :PROJECT_ROOT)
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rubocop"
|
4
|
+
require "active_record"
|
5
|
+
require "gda"
|
6
|
+
|
7
|
+
require_relative "rubocop/isucon"
|
8
|
+
require_relative "rubocop/isucon/version"
|
9
|
+
require_relative "rubocop/isucon/inject"
|
10
|
+
require_relative "rubocop/isucon/database_connection"
|
11
|
+
require_relative "rubocop/isucon/memorize_methods"
|
12
|
+
require_relative "rubocop/isucon/gda"
|
13
|
+
|
14
|
+
RuboCop::Isucon::Inject.defaults!
|
15
|
+
|
16
|
+
require_relative "rubocop/cop/isucon_cops"
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/rubocop/isucon/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "rubocop-isucon"
|
7
|
+
spec.version = RuboCop::Isucon::VERSION
|
8
|
+
spec.authors = ["sue445"]
|
9
|
+
spec.email = ["sue445@sue445.net"]
|
10
|
+
|
11
|
+
spec.summary = "RuboCop plugin for ruby reference implementation of ISUCON"
|
12
|
+
spec.description = "RuboCop plugin for ruby reference implementation of ISUCON"
|
13
|
+
spec.homepage = "https://github.com/sue445/rubocop-isucon"
|
14
|
+
spec.license = "MIT"
|
15
|
+
spec.required_ruby_version = ">= 2.6.0"
|
16
|
+
|
17
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
18
|
+
spec.metadata["source_code_uri"] = "https://github.com/sue445/rubocop-isucon"
|
19
|
+
spec.metadata["changelog_uri"] = "https://github.com/sue445/rubocop-isucon/blob/main/CHANGELOG.md"
|
20
|
+
spec.metadata["documentation_uri"] = "https://sue445.github.io/rubocop-isucon/"
|
21
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
22
|
+
|
23
|
+
# Specify which files should be added to the gem when it is released.
|
24
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
25
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
26
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
|
27
|
+
end
|
28
|
+
spec.bindir = "exe"
|
29
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
30
|
+
spec.require_paths = ["lib"]
|
31
|
+
|
32
|
+
# Uncomment to register a new dependency of your gem
|
33
|
+
# spec.add_dependency "example-gem", "~> 1.0"
|
34
|
+
|
35
|
+
# For more information and examples about making a new gem, checkout our
|
36
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
37
|
+
|
38
|
+
spec.add_runtime_dependency "activerecord", ">= 6.1.0"
|
39
|
+
spec.add_runtime_dependency "gda", "!= 1.1.2"
|
40
|
+
spec.add_runtime_dependency "rubocop", ">= 1.29.0"
|
41
|
+
spec.add_runtime_dependency "rubocop-performance"
|
42
|
+
|
43
|
+
spec.add_development_dependency "benchmark-ips"
|
44
|
+
spec.add_development_dependency "pry-byebug"
|
45
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
46
|
+
spec.add_development_dependency "redcarpet"
|
47
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
48
|
+
spec.add_development_dependency "rspec-its"
|
49
|
+
spec.add_development_dependency "rubocop_auto_corrector"
|
50
|
+
spec.add_development_dependency "sqlite3"
|
51
|
+
spec.add_development_dependency "yard"
|
52
|
+
end
|
metadata
ADDED
@@ -0,0 +1,286 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rubocop-isucon
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- sue445
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-07-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activerecord
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 6.1.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 6.1.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: gda
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "!="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.1.2
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "!="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.1.2
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rubocop
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.29.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.29.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop-performance
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: benchmark-ips
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: pry-byebug
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '13.0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '13.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: redcarpet
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rspec
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '3.0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '3.0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rspec-its
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rubocop_auto_corrector
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: sqlite3
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: yard
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
description: RuboCop plugin for ruby reference implementation of ISUCON
|
196
|
+
email:
|
197
|
+
- sue445@sue445.net
|
198
|
+
executables: []
|
199
|
+
extensions: []
|
200
|
+
extra_rdoc_files: []
|
201
|
+
files:
|
202
|
+
- ".github/workflows/gh-pages.yml"
|
203
|
+
- ".github/workflows/test.yml"
|
204
|
+
- ".gitignore"
|
205
|
+
- ".rspec"
|
206
|
+
- ".rubocop.yml"
|
207
|
+
- ".yardopts"
|
208
|
+
- CHANGELOG.md
|
209
|
+
- Gemfile
|
210
|
+
- LICENSE.txt
|
211
|
+
- README.md
|
212
|
+
- Rakefile
|
213
|
+
- benchmark/README.md
|
214
|
+
- benchmark/memorize.rb
|
215
|
+
- benchmark/parse_table.rb
|
216
|
+
- benchmark/shell.rb
|
217
|
+
- bin/console
|
218
|
+
- bin/setup
|
219
|
+
- config/default.yml
|
220
|
+
- config/enable-only-performance.yml
|
221
|
+
- gemfiles/activerecord_6_1.gemfile
|
222
|
+
- gemfiles/activerecord_7_0.gemfile
|
223
|
+
- lib/rubocop-isucon.rb
|
224
|
+
- lib/rubocop/cop/isucon/correctors/mysql2_n_plus_one_query_corrector.rb
|
225
|
+
- lib/rubocop/cop/isucon/correctors/mysql2_n_plus_one_query_corrector/correctable_methods.rb
|
226
|
+
- lib/rubocop/cop/isucon/correctors/mysql2_n_plus_one_query_corrector/replace_methods.rb
|
227
|
+
- lib/rubocop/cop/isucon/mixin/database_methods.rb
|
228
|
+
- lib/rubocop/cop/isucon/mixin/mysql2_xquery_methods.rb
|
229
|
+
- lib/rubocop/cop/isucon/mixin/sinatra_methods.rb
|
230
|
+
- lib/rubocop/cop/isucon/mysql2/join_without_index.rb
|
231
|
+
- lib/rubocop/cop/isucon/mysql2/many_join_table.rb
|
232
|
+
- lib/rubocop/cop/isucon/mysql2/n_plus_one_query.rb
|
233
|
+
- lib/rubocop/cop/isucon/mysql2/prepare_execute.rb
|
234
|
+
- lib/rubocop/cop/isucon/mysql2/select_asterisk.rb
|
235
|
+
- lib/rubocop/cop/isucon/mysql2/where_without_index.rb
|
236
|
+
- lib/rubocop/cop/isucon/shell/backtick.rb
|
237
|
+
- lib/rubocop/cop/isucon/shell/system.rb
|
238
|
+
- lib/rubocop/cop/isucon/sinatra/disable_logging.rb
|
239
|
+
- lib/rubocop/cop/isucon/sinatra/logger.rb
|
240
|
+
- lib/rubocop/cop/isucon/sinatra/rack_logger.rb
|
241
|
+
- lib/rubocop/cop/isucon/sinatra/serve_static_file.rb
|
242
|
+
- lib/rubocop/cop/isucon_cops.rb
|
243
|
+
- lib/rubocop/isucon.rb
|
244
|
+
- lib/rubocop/isucon/database_connection.rb
|
245
|
+
- lib/rubocop/isucon/gda.rb
|
246
|
+
- lib/rubocop/isucon/gda/client.rb
|
247
|
+
- lib/rubocop/isucon/gda/gda_ext.rb
|
248
|
+
- lib/rubocop/isucon/gda/join_condition.rb
|
249
|
+
- lib/rubocop/isucon/gda/join_operand.rb
|
250
|
+
- lib/rubocop/isucon/gda/node_location.rb
|
251
|
+
- lib/rubocop/isucon/gda/node_patcher.rb
|
252
|
+
- lib/rubocop/isucon/gda/where_condition.rb
|
253
|
+
- lib/rubocop/isucon/gda/where_operand.rb
|
254
|
+
- lib/rubocop/isucon/inject.rb
|
255
|
+
- lib/rubocop/isucon/memorize_methods.rb
|
256
|
+
- lib/rubocop/isucon/version.rb
|
257
|
+
- rubocop-isucon.gemspec
|
258
|
+
homepage: https://github.com/sue445/rubocop-isucon
|
259
|
+
licenses:
|
260
|
+
- MIT
|
261
|
+
metadata:
|
262
|
+
homepage_uri: https://github.com/sue445/rubocop-isucon
|
263
|
+
source_code_uri: https://github.com/sue445/rubocop-isucon
|
264
|
+
changelog_uri: https://github.com/sue445/rubocop-isucon/blob/main/CHANGELOG.md
|
265
|
+
documentation_uri: https://sue445.github.io/rubocop-isucon/
|
266
|
+
rubygems_mfa_required: 'true'
|
267
|
+
post_install_message:
|
268
|
+
rdoc_options: []
|
269
|
+
require_paths:
|
270
|
+
- lib
|
271
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
272
|
+
requirements:
|
273
|
+
- - ">="
|
274
|
+
- !ruby/object:Gem::Version
|
275
|
+
version: 2.6.0
|
276
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
277
|
+
requirements:
|
278
|
+
- - ">="
|
279
|
+
- !ruby/object:Gem::Version
|
280
|
+
version: '0'
|
281
|
+
requirements: []
|
282
|
+
rubygems_version: 3.3.7
|
283
|
+
signing_key:
|
284
|
+
specification_version: 4
|
285
|
+
summary: RuboCop plugin for ruby reference implementation of ISUCON
|
286
|
+
test_files: []
|