diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 00000000..632d94de --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,26 @@ +inherit_from: .rubocop_todo.yml + +AllCops: + TargetRubyVersion: 2.4 + NewCops: enable + +Layout/FirstArrayElementIndentation: + EnforcedStyle: consistent + +Style/StringLiterals: + EnforcedStyle: double_quotes + +Metrics/BlockLength: + Exclude: + - spec/**/* + +Naming/MethodParameterName: + AllowedNames: + - x + - y + - id + - to + +Naming/FileName: + Exclude: + - 'gemfiles/websocket-driver-*.gemfile' diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml new file mode 100644 index 00000000..790ef8cf --- /dev/null +++ b/.rubocop_todo.yml @@ -0,0 +1,61 @@ +# This configuration was generated by +# `rubocop --auto-gen-config` +# on 2020-08-25 19:54:53 UTC using RuboCop version 0.89.1. +# The point is for the user to remove these configuration records +# one by one as the offenses are removed from the code base. +# Note that changes in the inspected code, or installation of new +# versions of RuboCop, may require this file to be generated again. + +# Offense count: 24 +# Configuration parameters: IgnoredMethods. +Metrics/AbcSize: + Max: 66 + +# Offense count: 5 +# Configuration parameters: CountComments, CountAsOne. +Metrics/ClassLength: + Max: 258 + +# Offense count: 6 +# Configuration parameters: IgnoredMethods. +Metrics/CyclomaticComplexity: + Max: 14 + +# Offense count: 35 +# Configuration parameters: CountComments, CountAsOne, ExcludedMethods. +Metrics/MethodLength: + Max: 52 + +# Offense count: 9 +# Configuration parameters: CountComments, CountAsOne. +Metrics/ModuleLength: + Max: 602 + +# Offense count: 5 +# Configuration parameters: IgnoredMethods. +Metrics/PerceivedComplexity: + Max: 14 + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: Keywords. +# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW +Style/CommentAnnotation: + Exclude: + - 'spec/node_spec.rb' + +# Offense count: 45 +Style/Documentation: + Enabled: false + +# Offense count: 7 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: compact, exploded +Style/RaiseArgs: + Exclude: + - 'lib/ferrum/browser/client.rb' + - 'lib/ferrum/browser/command.rb' + - 'lib/ferrum/browser/process.rb' + - 'lib/ferrum/browser/xvfb.rb' + - 'lib/ferrum/frame/runtime.rb'