From 3d48766bf00f7cf45c4a3f330f904b06c2f475da Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Sat, 27 Mar 2021 20:35:17 -0700 Subject: [PATCH] Add default Rubocop config --- default.conf.yaml | 1 + rubocop/config.yml | 320 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 321 insertions(+) create mode 100644 rubocop/config.yml diff --git a/default.conf.yaml b/default.conf.yaml index e8f5955..b5bd758 100644 --- a/default.conf.yaml +++ b/default.conf.yaml @@ -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/ diff --git a/rubocop/config.yml b/rubocop/config.yml new file mode 100644 index 0000000..07aaa3e --- /dev/null +++ b/rubocop/config.yml @@ -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