.rubocop.yml in d_heap-0.3.0 vs .rubocop.yml in d_heap-0.4.0
- old
+ new
@@ -4,10 +4,11 @@
AllCops:
TargetRubyVersion: 2.5
NewCops: disable
Exclude:
+ - bin/benchmark-driver
- bin/rake
- bin/rspec
- bin/rubocop
###########################################################################
@@ -104,31 +105,54 @@
Naming/RescuedExceptionsVariableName: { Enabled: false }
###########################################################################
# Matrics:
+Metrics/CyclomaticComplexity:
+ Max: 10
+
# Although it may be better to split specs into multiple files...?
Metrics/BlockLength:
Exclude:
- "spec/**/*_spec.rb"
+ CountAsOne:
+ - array
+ - hash
+ - heredoc
+Metrics/ClassLength:
+ Max: 200
+ CountAsOne:
+ - array
+ - hash
+ - heredoc
+
###########################################################################
# Style...
Style/AccessorGrouping: { Enabled: false }
Style/AsciiComments: { Enabled: false } # 👮 can't stop our 🎉🥳🎊🥳!
+Style/ClassAndModuleChildren: { Enabled: false }
Style/EachWithObject: { Enabled: false }
Style/FormatStringToken: { Enabled: false }
Style/FloatDivision: { Enabled: false }
+Style/IfUnlessModifier: { Enabled: false }
+Style/IfWithSemicolon: { Enabled: false }
Style/Lambda: { Enabled: false }
Style/LineEndConcatenation: { Enabled: false }
Style/MixinGrouping: { Enabled: false }
+Style/MultilineBlockChain: { Enabled: false }
Style/PerlBackrefs: { Enabled: false } # use occasionally/sparingly
Style/RescueStandardError: { Enabled: false }
+Style/Semicolon: { Enabled: false }
Style/SingleLineMethods: { Enabled: false }
Style/StabbyLambdaParentheses: { Enabled: false }
+Style/WhenThen : { Enabled: false }
+# I require trailing commas elsewhere, but these are optional
+Style/TrailingCommaInArguments: { Enabled: false }
+
# If rubocop had an option to only enforce this on constants and literals (e.g.
# strings, regexp, range), I'd agree.
#
# But if you are using it e.g. on method arguments of unknown type, in the same
# style that ruby uses it with grep, then you are doing exactly the right thing.
@@ -147,11 +171,13 @@
- IgnoredMethods
- FunctionalMethods
EnforcedStyle: semantic
AllowBracesOnProceduralOneLiners: true
IgnoredMethods:
- - expect
+ - expect # rspec
+ - profile # ruby-prof
+ - ips # benchmark-ips
Style/FormatString:
EnforcedStyle: percent
@@ -166,5 +192,8 @@
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: consistent_comma
+
+Style/YodaCondition:
+ EnforcedStyle: forbid_for_equality_operators_only