1
0
Fork 0

Add default Rubocop config

This commit is contained in:
Jeremy Kaplan 2021-03-27 20:35:17 -07:00
commit 3d48766bf0
2 changed files with 321 additions and 0 deletions

View file

@ -13,6 +13,7 @@
~/.config/hg: hg/
~/.config/kak: kak/
~/.config/nvim: neovim/
~/.config/rubocop: rubocop/
~/.config/task: task/
~/.config/user-dirs.dirs: etc/user-dirs.dirs
~/.config/zsh: zsh/

320
rubocop/config.yml Normal file
View file

@ -0,0 +1,320 @@
---
Bundler/OrderedGems:
TreatCommentsAsGroupSeparators: true
Gemspec/DateAssignment:
Enabled: true
Lint/AmbiguousAssignment:
Enabled: true
Lint/BinaryOperatorWithIdenticalOperands:
Enabled: false
Lint/ConstantDefinitionInBlock:
Enabled: true
Lint/DeprecatedConstants:
Enabled: true
Lint/DuplicateBranch:
Enabled: true
Lint/DuplicateElsifCondition:
Enabled: true
Lint/DuplicateRegexpCharacterClassElement:
Enabled: true
Lint/DuplicateRequire:
Enabled: true
Lint/DuplicateRescueException:
Enabled: true
Lint/EmptyBlock:
Enabled: true
Lint/EmptyClass:
Enabled: true
Lint/EmptyConditionalBody:
Enabled: true
Lint/EmptyFile:
Enabled: true
Lint/FloatComparison:
Enabled: false
Lint/HashCompareByIdentity:
Enabled: true
Lint/IdentityComparison:
Enabled: true
Lint/LambdaWithoutLiteralBlock:
Enabled: true
Lint/MissingSuper:
Enabled: true
Lint/NoReturnInBeginEndBlocks:
Enabled: true
Lint/NumberedParameterAssignment:
Enabled: true
Lint/OrAssignmentToConstant:
Enabled: true
Lint/OutOfRangeRegexpRef:
Enabled: false
Lint/RedundantDirGlobSort:
Enabled: true
Lint/RedundantSafeNavigation:
Enabled: true
Lint/SelfAssignment:
Enabled: true
Lint/SymbolConversion:
Enabled: true
Lint/ToEnumArguments:
Enabled: true
Lint/TopLevelReturnWithArgument:
Enabled: true
Lint/TrailingCommaInAttributeDeclaration:
Enabled: true
Lint/TripleQuotes:
Enabled: true
Lint/UnexpectedBlockArity:
Enabled: false
Lint/UnmodifiedReduceAccumulator:
Enabled: true
Lint/UnreachableLoop:
Enabled: true
Lint/UselessMethodDefinition:
Enabled: true
Lint/UselessTimes:
Enabled: true
Layout/BeginEndAlignment:
Enabled: true
EnforcedStyleAlignWith: start_of_line
Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true
Layout/FirstArrayElementIndentation:
EnforcedStyle: consistent
Layout/FirstArgumentIndentation:
EnforcedStyle: consistent
Layout/HashAlignment:
EnforcedColonStyle: table
EnforcedHashRocketStyle: table
Layout/LineLength:
Enabled: false
Layout/SpaceAroundEqualsInParameterDefault:
EnforcedStyle: no_space
Layout/SpaceAroundMethodCallOperator:
Enabled: true
Layout/SpaceBeforeBrackets:
Enabled: true
Lint/DeprecatedOpenSSLConstant:
Enabled: true
Lint/MixedRegexpCaptureTypes:
Enabled: true
Lint/RaiseException:
Enabled: true
Lint/StructNewOverride:
Enabled: true
Metrics/AbcSize:
Enabled: false
Metrics/BlockLength:
Enabled: false
Metrics/ClassLength:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/PerceivedComplexity:
Enabled: false
Style/AccessorGrouping:
Enabled: false
Style/ArgumentsForwarding:
Enabled: true
Style/ArrayCoercion:
Enabled: false
Style/AsciiComments:
Enabled: false
Style/BisectedAttrAccessor:
Enabled: false
Style/CaseLikeIf:
Enabled: false
Style/ClassAndModuleChildren:
Exclude:
- '**/*.rbi'
Style/ClassEqualityComparison:
Enabled: true
Style/CollectionCompact:
Enabled: true
Style/CombinableLoops:
Enabled: false
Style/Documentation:
Enabled: false
Style/DocumentDynamicEvalDefinition:
Enabled: true
Style/EndlessMethod:
Enabled: true
Style/ExplicitBlockArgument:
Enabled: false
Style/ExponentialNotation:
Enabled: false
Style/FrozenStringLiteralComment:
EnforcedStyle: always_true
Exclude:
- '**/*.rbi'
Style/GlobalStdStream:
Enabled: true
Style/GuardClause:
Enabled: false
Style/HashAsLastArrayItem:
Enabled: true
Style/HashConversion:
Enabled: true
Style/HashEachMethods:
Enabled: false
Style/HashExcept:
Enabled: true
Style/HashLikeCase:
Enabled: false
Style/HashTransformKeys:
Enabled: false
Style/HashTransformValues:
Enabled: false
Style/IfUnlessModifier:
Enabled: false
Style/IfWithBooleanLiteralBranches:
Enabled: true
Style/KeywordParametersOrder:
Enabled: true
Style/NegatedIfElseCondition:
Enabled: true
Style/NilLambda:
Enabled: false
Style/NumericLiterals:
Enabled: false
Style/OptionalBooleanParameter:
Enabled: false
Style/RedundantArgument:
Enabled: false
Style/RedundantAssignment:
Enabled: true
Style/RedundantFetchBlock:
Enabled: false
Style/RedundantFileExtensionInRequire:
Enabled: true
Style/RedundantRegexpCharacterClass:
Enabled: true
Style/RedundantRegexpEscape:
Enabled: true
Style/RedundantSelfAssignment:
Enabled: false
Style/SingleArgumentDig:
Enabled: false
Style/SlicingWithRange:
Enabled: true
Style/StringConcatenation:
Enabled: false
Style/SoleNestedConditional:
Enabled: true
Style/SwapValues:
Enabled: true
Style/SymbolArray:
Enabled: false
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/WordArray:
Enabled: false