# Relaxed.Ruby.Style require: - rubocop-performance - rubocop-rails - rubocop-graphql AllCops: TargetRubyVersion: 2.5 # We use class vars and will have to continue doing so for compatability Style/ClassVars: Enabled: false # We need these names for backwards compatability Naming/PredicateName: Enabled: false # We want to name rescued errors as error not simply e. Naming/RescuedExceptionsVariableName: Enabled: false Naming/AccessorMethodName: Enabled: false # This has been used for customization Style/MutableConstant: Enabled: false Style/ClassAndModuleChildren: Enabled: false Style/EmptyElse: Enabled: false Style/GuardClause: Enabled: false Style/Next: Enabled: false Style/NumericPredicate: Enabled: false Style/WordArray: Enabled: false Style/ConditionalAssignment: Enabled: false Performance/Count: Enabled: false Style/RaiseArgs: Enabled: false Naming/BinaryOperatorParameterName: Enabled: false # We can use good judgement here Style/RegexpLiteral: Enabled: false # Unicode comments are useful Style/AsciiComments: Enabled: false Layout/EndAlignment: Enabled: false Layout/ElseAlignment: Enabled: false Layout/IndentationWidth: Enabled: false Layout/ParameterAlignment: Enabled: false Layout/ClosingParenthesisIndentation: Enabled: false Layout/MultilineMethodCallIndentation: Enabled: false Layout/FirstArrayElementIndentation: Enabled: false Layout/FirstHashElementIndentation: Enabled: false Layout/HashAlignment: Enabled: false Style/TrailingCommaInArguments: Enabled: false Style/TrailingCommaInArrayLiteral: Enabled: false Style/TrailingCommaInHashLiteral: Enabled: false # Symbol Arrays are ok and the %i syntax widely unknown Style/SymbolArray: Enabled: false Rails/DynamicFindBy: Whitelist: - find_by_param - find_by_param! # It's okay to skip model validations to setup a spec. Rails/SkipsModelValidations: Exclude: - db/seeds/**/*.rb - '*/spec/**/*' # We use a lot of # # expect { # something # }.to { happen } # # syntax in the specs files. Lint/AmbiguousBlockAssociation: Exclude: - '*/spec/**/*' - 'spec/**/*' # For the benefit of apps that inherit from this config Security/Eval: Exclude: - 'Gemfile' - '*/Gemfile' Naming/VariableNumber: Enabled: false # Write empty methods as you wish. Style/EmptyMethod: Enabled: false # From http://relaxed.ruby.style/ Style/Alias: Enabled: false StyleGuide: http://relaxed.ruby.style/#stylealias Style/BeginBlock: Enabled: false StyleGuide: http://relaxed.ruby.style/#stylebeginblock Style/BlockDelimiters: Enabled: false StyleGuide: http://relaxed.ruby.style/#styleblockdelimiters Style/Documentation: Enabled: false StyleGuide: http://relaxed.ruby.style/#styledocumentation Layout/DotPosition: Enabled: false StyleGuide: http://relaxed.ruby.style/#styledotposition Style/DoubleNegation: Enabled: false StyleGuide: http://relaxed.ruby.style/#styledoublenegation Style/EndBlock: Enabled: false StyleGuide: http://relaxed.ruby.style/#styleendblock Style/FormatString: Enabled: false StyleGuide: http://relaxed.ruby.style/#styleformatstring Style/IfUnlessModifier: Enabled: false StyleGuide: http://relaxed.ruby.style/#styleifunlessmodifier Style/Lambda: Enabled: false StyleGuide: http://relaxed.ruby.style/#stylelambda Style/ModuleFunction: Enabled: false StyleGuide: http://relaxed.ruby.style/#stylemodulefunction Style/MultilineBlockChain: Enabled: false StyleGuide: http://relaxed.ruby.style/#stylemultilineblockchain Style/NegatedIf: Enabled: false StyleGuide: http://relaxed.ruby.style/#stylenegatedif Style/NegatedWhile: Enabled: false StyleGuide: http://relaxed.ruby.style/#stylenegatedwhile Style/ParallelAssignment: Enabled: false StyleGuide: http://relaxed.ruby.style/#styleparallelassignment Style/PercentLiteralDelimiters: Enabled: false StyleGuide: http://relaxed.ruby.style/#stylepercentliteraldelimiters Style/PerlBackrefs: Enabled: false StyleGuide: http://relaxed.ruby.style/#styleperlbackrefs Style/Semicolon: Enabled: false StyleGuide: http://relaxed.ruby.style/#stylesemicolon Style/SignalException: Enabled: false StyleGuide: http://relaxed.ruby.style/#stylesignalexception Style/SingleLineBlockParams: Enabled: false StyleGuide: http://relaxed.ruby.style/#stylesinglelineblockparams Style/SingleLineMethods: Enabled: false StyleGuide: http://relaxed.ruby.style/#stylesinglelinemethods Layout/SpaceBeforeBlockBraces: Enabled: false StyleGuide: http://relaxed.ruby.style/#stylespacebeforeblockbraces Layout/SpaceInsideParens: Enabled: false StyleGuide: http://relaxed.ruby.style/#stylespaceinsideparens Style/SpecialGlobalVars: Enabled: false StyleGuide: http://relaxed.ruby.style/#stylespecialglobalvars Style/StringLiterals: Enabled: false StyleGuide: http://relaxed.ruby.style/#stylestringliterals Style/SymbolProc: Enabled: false Style/TernaryParentheses: Enabled: false Style/WhileUntilModifier: Enabled: false StyleGuide: http://relaxed.ruby.style/#stylewhileuntilmodifier Lint/AmbiguousRegexpLiteral: Enabled: false StyleGuide: http://relaxed.ruby.style/#lintambiguousregexpliteral Lint/AssignmentInCondition: Enabled: false StyleGuide: http://relaxed.ruby.style/#lintassignmentincondition Metrics/AbcSize: Enabled: false Metrics/BlockNesting: Enabled: false Metrics/ClassLength: Enabled: false Metrics/ModuleLength: Enabled: false Metrics/BlockLength: Enabled: false Metrics/CyclomaticComplexity: Enabled: false Layout/LineLength: Enabled: false Metrics/MethodLength: Enabled: false Metrics/ParameterLists: Enabled: false Metrics/PerceivedComplexity: Enabled: false Bundler/OrderedGems: Enabled: false Style/NumericLiterals: Enabled: false Style/FrozenStringLiteralComment: Enabled: true EnforcedStyle: always # json.() is idiomatic in jbuilder files Style/LambdaCall: Enabled: false Naming/MethodParameterName: AllowedNames: - id - to - _ # Rubocop doesn't understand side-effects Style/IdenticalConditionalBranches: Enabled: false Naming/MemoizedInstanceVariableName: Enabled: false Lint/BinaryOperatorWithIdenticalOperands: Enabled: false Lint/SuppressedException: Enabled: false Rails/ReflectionClassName: Enabled: true Exclude: - app/models/ibrain/role_user.rb Gemspec/DateAssignment: # new in 1.10 Enabled: true Gemspec/RequireMFA: # new in 1.23 Enabled: true Layout/LineEndStringConcatenationIndentation: # new in 1.18 Enabled: true Layout/SpaceBeforeBrackets: # new in 1.7 Enabled: true Lint/AmbiguousAssignment: # new in 1.7 Enabled: true Lint/AmbiguousOperatorPrecedence: # new in 1.21 Enabled: true Lint/AmbiguousRange: # new in 1.19 Enabled: true Lint/DeprecatedConstants: # new in 1.8 Enabled: true Lint/DuplicateBranch: # new in 1.3 Enabled: true Lint/DuplicateRegexpCharacterClassElement: # new in 1.1 Enabled: true Lint/EmptyBlock: # new in 1.1 Enabled: true Lint/EmptyClass: # new in 1.3 Enabled: true Lint/EmptyInPattern: # new in 1.16 Enabled: true Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21 Enabled: true Lint/LambdaWithoutLiteralBlock: # new in 1.8 Enabled: true Lint/NoReturnInBeginEndBlocks: # new in 1.2 Enabled: true Lint/NumberedParameterAssignment: # new in 1.9 Enabled: true Lint/OrAssignmentToConstant: # new in 1.9 Enabled: true Lint/RedundantDirGlobSort: # new in 1.8 Enabled: true Lint/RequireRelativeSelfPath: # new in 1.22 Enabled: true Lint/SymbolConversion: # new in 1.9 Enabled: true Lint/ToEnumArguments: # new in 1.1 Enabled: true Lint/TripleQuotes: # new in 1.9 Enabled: true Lint/UnexpectedBlockArity: # new in 1.5 Enabled: true Lint/UnmodifiedReduceAccumulator: # new in 1.1 Enabled: true Lint/UselessRuby2Keywords: # new in 1.23 Enabled: true Security/IoMethods: # new in 1.22 Enabled: true Style/ArgumentsForwarding: # new in 1.1 Enabled: true Style/CollectionCompact: # new in 1.2 Enabled: true Style/DocumentDynamicEvalDefinition: # new in 1.1 Enabled: true Style/EndlessMethod: # new in 1.8 Enabled: true Style/HashConversion: # new in 1.10 Enabled: true Style/HashExcept: # new in 1.7 Enabled: true Style/IfWithBooleanLiteralBranches: # new in 1.9 Enabled: true Style/InPatternThen: # new in 1.16 Enabled: true Style/MultilineInPatternThen: # new in 1.16 Enabled: true Style/NegatedIfElseCondition: # new in 1.2 Enabled: true Style/NilLambda: # new in 1.3 Enabled: true Style/NumberedParameters: # new in 1.22 Enabled: true Style/NumberedParametersLimit: # new in 1.22 Enabled: true Style/OpenStructUse: # new in 1.23 Enabled: true Style/QuotedSymbols: # new in 1.16 Enabled: true Style/RedundantArgument: # new in 1.4 Enabled: true Style/RedundantSelfAssignmentBranch: # new in 1.19 Enabled: true Style/SelectByRegexp: # new in 1.22 Enabled: true Style/StringChars: # new in 1.12 Enabled: true Style/SwapValues: # new in 1.1 Enabled: true Performance/AncestorsInclude: # new in 1.7 Enabled: true Performance/BigDecimalWithNumericArgument: # new in 1.7 Enabled: true Performance/BlockGivenWithExplicitBlock: # new in 1.9 Enabled: true Performance/CollectionLiteralInLoop: # new in 1.8 Enabled: true Performance/ConcurrentMonotonicTime: # new in 1.12 Enabled: true Performance/ConstantRegexp: # new in 1.9 Enabled: true Performance/MapCompact: # new in 1.11 Enabled: true Performance/MethodObjectAsBlock: # new in 1.9 Enabled: true Performance/RedundantEqualityComparisonBlock: # new in 1.10 Enabled: true Performance/RedundantSortBlock: # new in 1.7 Enabled: true Performance/RedundantSplitRegexpArgument: # new in 1.10 Enabled: true Performance/RedundantStringChars: # new in 1.7 Enabled: true Performance/ReverseFirst: # new in 1.7 Enabled: true Performance/SortReverse: # new in 1.7 Enabled: true Performance/Squeeze: # new in 1.7 Enabled: true Performance/StringInclude: # new in 1.7 Enabled: true Performance/Sum: # new in 1.8 Enabled: true Rails/ActiveRecordCallbacksOrder: # new in 2.7 Enabled: true Rails/AddColumnIndex: # new in 2.11 Enabled: true Rails/AfterCommitOverride: # new in 2.8 Enabled: true Rails/AttributeDefaultBlockValue: # new in 2.9 Enabled: true Rails/EagerEvaluationLogMessage: # new in 2.11 Enabled: true Rails/ExpandedDateRange: # new in 2.11 Enabled: true Rails/FindById: # new in 2.7 Enabled: true Rails/I18nLocaleAssignment: # new in 2.11 Enabled: true Rails/Inquiry: # new in 2.7 Enabled: true Rails/MailerName: # new in 2.7 Enabled: true Rails/MatchRoute: # new in 2.7 Enabled: true Rails/NegateInclude: # new in 2.7 Enabled: true Rails/Pluck: # new in 2.7 Enabled: true Rails/PluckInWhere: # new in 2.7 Enabled: true Rails/RedundantTravelBack: # new in 2.12 Enabled: true Rails/RenderInline: # new in 2.7 Enabled: true Rails/RenderPlainText: # new in 2.7 Enabled: true Rails/ShortI18n: # new in 2.7 Enabled: true Rails/SquishedSQLHeredocs: # new in 2.8 Enabled: true Rails/TimeZoneAssignment: # new in 2.10 Enabled: true Rails/UnusedIgnoredColumns: # new in 2.11 Enabled: true Rails/WhereEquals: # new in 2.9 Enabled: true Rails/WhereExists: # new in 2.7 Enabled: true Rails/WhereNot: # new in 2.8 Enabled: true Gemspec/RequiredRubyVersion: Enabled: false GraphQL/FieldDescription: Enabled: false GraphQL/ObjectDescription: Enabled: true Exclude: - app/graphql/policies/*.rb - app/graphql/*.rb GraphQL/ExtractType: Enabled: false Rails/UnknownEnv: Environments: - production - development - test - staging