Add and configure rubocop and rubocop-rspec

This commit is contained in:
Wilson Silva
2023-01-06 10:25:59 +07:00
parent e3ef933b4f
commit b8d663ca00
2 changed files with 23 additions and 1 deletions

View File

@@ -1,13 +1,33 @@
require: rubocop-rspec
AllCops:
TargetRubyVersion: 3.2
DisplayCopNames: true
NewCops: enable
# ----------------------- Style -----------------------
Style/StringLiterals:
Enabled: true
EnforcedStyle: double_quotes
EnforcedStyle: single_quotes
Style/StringLiteralsInInterpolation:
Enabled: true
EnforcedStyle: double_quotes
# ----------------------- Layout ----------------------
Layout/LineLength:
Max: 120
# ---------------------- Metrics ----------------------
Metrics/BlockLength:
Exclude:
- '**/*_spec.rb'
- nostr.gemspec
# ----------------------- RSpec -----------------------
RSpec/ExampleLength:
Enabled: false