Skip to content

Commit

Permalink
Add RuboCop
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWayfer authored and route committed Feb 25, 2021
1 parent 31413a4 commit f11d477
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -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'
61 changes: 61 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit f11d477

Please sign in to comment.