Skip to content

Commit

Permalink
style: 💄 RuboCop の設定ファイルを更新した (#126)
Browse files Browse the repository at this point in the history
* style: 💄 RuboCop の設定ファイルを更新した

* style: 💄 prekin.gemspec は RuboCop の対象外にする
  • Loading branch information
nikukyugamer authored Sep 24, 2022
1 parent d7fbb26 commit c03fd8b
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 35 deletions.
67 changes: 32 additions & 35 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,44 @@
Style/FrozenStringLiteralComment:
Enabled: false
AllCops:
NewCops: enable
DisplayCopNames: true
Exclude:
- 'vendor/**/*'
- 'node_modules/**/*'
- 'spec/**/*'
- 'Guardfile'
- 'bin/**/*'
- 'tmp/**/*'
- 'prekin.gemspec'

Style/TrailingCommaInHashLiteral:
Enabled: false # 有効にすると見た目がいいレイアウトにした際に怒られるため無効にする
# EnforcedStyleForMultiline: consistent_comma

Style/TrailingCommaInArrayLiteral:
Enabled: false # 有効にすると見た目がいいレイアウトにした際に怒られるため無効にする
# EnforcedStyleForMultiline: consistent_comma
Style/Documentation:
Enabled: false

Style/AsciiComments:
Style/FrozenStringLiteralComment:
Enabled: false

Metrics/LineLength:
Max: 250 # 数字に特に根拠はない
Style/StringLiterals:
EnforcedStyle: single_quotes

Style/NumericLiterals:
Enabled: false
Style/StringLiteralsInInterpolation:
EnforcedStyle: single_quotes

Style/PercentLiteralDelimiters:
PreferredDelimiters:
default: '()'
'%i': '[]'
'%I': '[]'
'%r': '{}'
'%w': '()'
'%W': '[]'
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma

Style/Documentation:
Enabled: false # 一行目に class って書いてもいいでしょ
Metrics/BlockLength:
Max: 52

Style/ClassAndModuleChildren:
Enabled: false # 暫定的に false にする(名前空間関連)
Metrics/ClassLength:
Max: 500

Metrics/MethodLength:
Enabled: false # メソッドの長さが長いと怒られる(有用なので後で調整すること)
Metrics/CyclomaticComplexity:
Max: 16

Metrics/AbcSize:
Max: 20 # これぐらいの長さになることは許してほしい
Metrics/MethodLength:
Max: 65

Style/RegexpLiteral:
Enabled: false # 有効にすると Lint/Syntax で怒られる?ので無効化
Metrics/PerceivedComplexity:
Max: 17

# 頃合いを見て true に変更する
Gemspec/RequiredRubyVersion:
Enabled: false
Metrics/ModuleLength:
Max: 160
1 change: 1 addition & 0 deletions goodcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rules:
1 change: 1 addition & 0 deletions prekin.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ Gem::Specification.new do |spec|

spec.add_development_dependency 'pry'
spec.add_development_dependency 'rubocop'
spec.metadata['rubygems_mfa_required'] = 'true'
end

0 comments on commit c03fd8b

Please sign in to comment.