diff --git a/.rubocop.yml b/.rubocop.yml index 1b409334..72a72528 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,10 +4,20 @@ AllCops: Exclude: - '*.gemspec' - 'vendor/**/*' +Layout/EmptyLinesAroundAttributeAccessor: + Enabled: true Layout/LineLength: Max: 120 +Layout/SpaceAroundMethodCallOperator: + Enabled: true +Lint/DeprecatedOpenSSLConstant: + Enabled: true Lint/UriEscapeUnescape: Enabled: false +Lint/RaiseException: + Enabled: true +Lint/StructNewOverride: + Enabled: true Metrics/AbcSize: Max: 25 Metrics/BlockLength: @@ -27,8 +37,18 @@ Style/ClassVars: Enabled: false Style/Documentation: Enabled: false +Style/ExponentialNotation: + Enabled: true Style/FormatStringToken: Enabled: false +Style/HashEachMethods: + Enabled: true +Style/HashTransformKeys: + Enabled: true +Style/HashTransformValues: + Enabled: true Style/NumericPredicate: Exclude: - 'app/controllers/vuln_api.rb' +Style/SlicingWithRange: + Enabled: true diff --git a/spec/app/controllers/core_spec.rb b/spec/app/controllers/core_spec.rb index ca6cebcb..40168e87 100644 --- a/spec/app/controllers/core_spec.rb +++ b/spec/app/controllers/core_spec.rb @@ -70,7 +70,7 @@ describe WPScan::Controller::Core do let(:cli_args) { "#{super()} --no-update" } it 'raises an error' do - expect { core.update_db_required? }. to raise_error(WPScan::Error::MissingDatabaseFile) + expect { core.update_db_required? }.to raise_error(WPScan::Error::MissingDatabaseFile) end end diff --git a/spec/app/finders/plugin_version/readme_spec.rb b/spec/app/finders/plugin_version/readme_spec.rb index c8a77dd1..90b43752 100644 --- a/spec/app/finders/plugin_version/readme_spec.rb +++ b/spec/app/finders/plugin_version/readme_spec.rb @@ -109,7 +109,7 @@ describe WPScan::Finders::PluginVersion::Readme do 'a-lead-capture-contact-form-and-tab-button-by-awebvoicecom' => '3.1', 'backup-scheduler' => '1.5.9', 'release_date_slash' => '1.0.4' - }. each do |file, version_number| + }.each do |file, version_number| context "whith #{file}.txt" do it 'returns the expected version' do @file = "#{file}.txt" diff --git a/wpscan.gemspec b/wpscan.gemspec index 368c660b..1605a704 100644 --- a/wpscan.gemspec +++ b/wpscan.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'rspec', '~> 3.9.0' s.add_development_dependency 'rspec-its', '~> 1.3.0' s.add_development_dependency 'rubocop', '~> 0.84.0' - s.add_development_dependency 'rubocop-performance', '~> 1.5.0' + s.add_development_dependency 'rubocop-performance', '~> 1.6.0' s.add_development_dependency 'simplecov', '~> 0.18.2' s.add_development_dependency 'simplecov-lcov', '~> 0.8.0' s.add_development_dependency 'stackprof', '~> 0.2.12'