require: - rubocop-performance - rubocop-rake AllCops: DisplayStyleGuide: true NewCops: enable # Require versions for every gem Bundler/GemVersion: Enabled: true Gemspec/DependencyVersion: Enabled: true Layout/BlockAlignment: EnforcedStyleAlignWith: start_of_block Layout/FirstArrayElementLineBreak: Enabled: true Layout/FirstHashElementLineBreak: Enabled: true Layout/HashAlignment: EnforcedColonStyle: table EnforcedHashRocketStyle: table Layout/MultilineArrayLineBreaks: Enabled: true Layout/MultilineAssignmentLayout: Enabled: true EnforcedStyle: same_line Layout/MultilineHashKeyLineBreaks: Enabled: true # Allow coordinate parameter names (along with the rest of the defaults, which must be redefined here) Naming/MethodParameterName: AllowedNames: - as - at - by - cc - db - id - if - in - io - ip - of - 'on' - os - pp - to - x - y - z Style/AsciiComments: Enabled: true Style/AutoResourceCleanup: Enabled: true Style/CaseLikeIf: MinBranchesCount: 2 Style/ClassMethodsDefinitions: Enabled: true EnforcedStyle: self_class Style/CollectionMethods: Enabled: true Style/DateTime: Enabled: true Style/FloatDivision: EnforcedStyle: fdiv Style/IpAddresses: Enabled: true # I'd like this if we can declare a list of functions that should use parentheses. # e.g. let() for rspec #Style/MethodCallWithArgsParentheses: # Enabled: true # AllowParenthesesInCamelCaseMethod: true # AllowParenthesesInChaining: true # AllowParenthesesInMultilineCall: true # EnforcedStyle: omit_parentheses Style/MethodCalledOnDoEndBlock: Enabled: true Style/OptionHash: Enabled: true Style/Send: Enabled: true Style/StaticClass: Enabled: true # Double quotes everywhere so they don't have to change if interpolation is added to a string Style/StringLiterals: EnforcedStyle: double_quotes Style/StringMethods: Enabled: true Style/SymbolArray: MinSize: 1 Style/StringLiteralsInInterpolation: EnforcedStyle: double_quotes Style/TernaryParentheses: EnforcedStyle: require_parentheses_when_complex Style/TopLevelMethodDefinition: Enabled: true Style/TrailingCommaInArguments: EnforcedStyleForMultiline: consistent_comma Style/TrailingCommaInArrayLiteral: EnforcedStyleForMultiline: consistent_comma Style/TrailingCommaInHashLiteral: EnforcedStyleForMultiline: consistent_comma Style/UnlessLogicalOperators: Enabled: true Style/WordArray: MinSize: 1