diff --git a/.rubocop.yml b/.rubocop.yml index 659d449..d30cd76 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,267 +1,1872 @@ +# cspell:Disable require: - - rubocop-factory_bot - - rubocop-minitest - - rubocop-performance - rubocop-rails + - rubocop-factory_bot + +AllCops: + TargetRubyVersion: 3.3.0 + # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop + # to ignore them, so only the ones explicitly set in this file are enabled. + DisabledByDefault: true + # From time to time rubocop adds new cops to say rails etc. + # So rather than disabling them it's better to enable them, + # try it out and then disable them manually one by one. + NewCops: enable + Exclude: + - "app/javascript/**/*" + - "app/assets/**/*" + - "app/views/**/*.erb" + - "lib/tasks/**/*" + - ".vscode/**/*" + - ".husky/**/*" + - ".bundle/**/*" + - ".circleci/**/*" + - ".semaphore/**/*" + - "**/log/**/*" + - "**/public/**/*" + - "**/tmp/**/*" + - "**/templates/**/*" + - "**/vendor/**/*" + - "node_modules/**/*" + - "bin/**/*" + - "config/webpack/**/*" + - "db/schema.rb" + +Bundler/DuplicatedGem: + Enabled: true + Include: + - "**/*.gemfile" + - "**/Gemfile" + - "**/gems.rb" + +Bundler/DuplicatedGroup: + Enabled: false + +Bundler/GemComment: + Enabled: false + +Bundler/GemFilename: + Enabled: false + +Bundler/GemVersion: + Enabled: false + +Bundler/InsecureProtocolSource: + Enabled: true + Include: + - "**/*.gemfile" + - "**/Gemfile" + - "**/gems.rb" + +Bundler/OrderedGems: + Enabled: false + +Gemspec/DependencyVersion: + Enabled: false + +Gemspec/DeprecatedAttributeAssignment: + Enabled: true + +Gemspec/DevelopmentDependencies: + Enabled: false + +Gemspec/DuplicatedAssignment: + Enabled: true + Include: + - "**/*.gemspec" + +Gemspec/OrderedDependencies: + Enabled: false + +Gemspec/RequireMFA: + Enabled: false + +Gemspec/RequiredRubyVersion: + Enabled: false + +Gemspec/RubyVersionGlobalsUsage: + Enabled: false + +Layout/AccessModifierIndentation: + Enabled: true + EnforcedStyle: indent + IndentationWidth: ~ + +Layout/ArgumentAlignment: + Enabled: true + EnforcedStyle: with_fixed_indentation + +Layout/ArrayAlignment: + Enabled: true + EnforcedStyle: with_fixed_indentation + +Layout/AssignmentIndentation: + Enabled: true + IndentationWidth: ~ + +Layout/BeginEndAlignment: + Enabled: true + EnforcedStyleAlignWith: start_of_line + Severity: warning + +Layout/BlockAlignment: + Enabled: true + EnforcedStyleAlignWith: either + +Layout/BlockEndNewline: + Enabled: true + +Layout/CaseIndentation: + Enabled: true + EnforcedStyle: end + +Layout/ClassStructure: + Enabled: false + +Layout/ClosingHeredocIndentation: + Enabled: true + +Layout/ClosingParenthesisIndentation: + Enabled: true + +Layout/CommentIndentation: + Enabled: true + +Layout/ConditionPosition: + Enabled: true + +Layout/DefEndAlignment: + Enabled: true + EnforcedStyleAlignWith: start_of_line + Severity: warning + +Layout/DotPosition: + Enabled: true + EnforcedStyle: leading + +Layout/ElseAlignment: + Enabled: true + +Layout/EmptyComment: + Enabled: true + AllowBorderComment: true + AllowMarginComment: true + +Layout/EmptyLineAfterGuardClause: + Enabled: false + +Layout/EmptyLineAfterMagicComment: + Enabled: true + +Layout/EmptyLineAfterMultilineCondition: + Enabled: false + +Layout/EmptyLineBetweenDefs: + Enabled: true + AllowAdjacentOneLineDefs: false + NumberOfEmptyLines: 1 + +Layout/EmptyLines: + Enabled: true + +Layout/EmptyLinesAroundAccessModifier: + Enabled: true + +Layout/EmptyLinesAroundArguments: + Enabled: true + +Layout/EmptyLinesAroundAttributeAccessor: + Enabled: false + +Layout/EmptyLinesAroundBeginBody: + Enabled: true + +Layout/EmptyLinesAroundBlockBody: + Enabled: true + EnforcedStyle: no_empty_lines + +Layout/EmptyLinesAroundClassBody: + Enabled: true + EnforcedStyle: no_empty_lines + +Layout/EmptyLinesAroundExceptionHandlingKeywords: + Enabled: true + +Layout/EmptyLinesAroundMethodBody: + Enabled: true + +Layout/EmptyLinesAroundModuleBody: + Enabled: true + EnforcedStyle: no_empty_lines + +Layout/EndAlignment: + Enabled: true + EnforcedStyleAlignWith: variable + Severity: warning + +Layout/EndOfLine: + Enabled: true + EnforcedStyle: native + +Layout/ExtraSpacing: + Enabled: true + AllowForAlignment: false + AllowBeforeTrailingComments: true + ForceEqualSignAlignment: false + +Layout/FirstArgumentIndentation: + Enabled: true + EnforcedStyle: consistent + IndentationWidth: ~ + +Layout/FirstArrayElementIndentation: + Enabled: true + EnforcedStyle: consistent + IndentationWidth: ~ + +Layout/FirstArrayElementLineBreak: + Enabled: false + +Layout/FirstHashElementIndentation: + Enabled: true + EnforcedStyle: consistent + IndentationWidth: ~ + +Layout/FirstHashElementLineBreak: + Enabled: false + +Layout/FirstMethodArgumentLineBreak: + Enabled: false + +Layout/FirstMethodParameterLineBreak: + Enabled: false + +Layout/FirstParameterIndentation: + Enabled: false + +Layout/HashAlignment: + Enabled: true + EnforcedHashRocketStyle: key + EnforcedColonStyle: key + EnforcedLastArgumentHashStyle: always_inspect + +Layout/HeredocArgumentClosingParenthesis: + Enabled: false + +Layout/HeredocIndentation: + Enabled: true + +Layout/IndentationConsistency: + Enabled: true + EnforcedStyle: normal + +Layout/IndentationStyle: + Enabled: true + IndentationWidth: ~ + +Layout/IndentationWidth: + Enabled: true + Width: 2 + AllowedPatterns: [] + +Layout/InitialIndentation: + Enabled: true + +Layout/LeadingCommentSpace: + Enabled: true + +Layout/LeadingEmptyLines: + Enabled: true + +Layout/LineContinuationLeadingSpace: + Enabled: false + +Layout/LineContinuationSpacing: + Enabled: true + +Layout/LineEndStringConcatenationIndentation: + Enabled: false + +Layout/LineLength: + Enabled: false + +Layout/MultilineArrayBraceLayout: + Enabled: true + EnforcedStyle: symmetrical + +Layout/MultilineArrayLineBreaks: + Enabled: false + +Layout/MultilineAssignmentLayout: + Enabled: false + +Layout/MultilineBlockLayout: + Enabled: true + +Layout/MultilineHashBraceLayout: + Enabled: true + EnforcedStyle: symmetrical + +Layout/MultilineHashKeyLineBreaks: + Enabled: false + +Layout/MultilineMethodArgumentLineBreaks: + Enabled: false + +Layout/MultilineMethodCallBraceLayout: + Enabled: true + EnforcedStyle: symmetrical + +Layout/MultilineMethodCallIndentation: + Enabled: true + EnforcedStyle: indented + IndentationWidth: ~ + +Layout/MultilineMethodDefinitionBraceLayout: + Enabled: true + EnforcedStyle: symmetrical + +Layout/MultilineMethodParameterLineBreaks: + Enabled: false + +Layout/MultilineOperationIndentation: + Enabled: true + EnforcedStyle: indented + IndentationWidth: ~ + +Layout/ParameterAlignment: + Enabled: true + EnforcedStyle: with_fixed_indentation + IndentationWidth: ~ + +Layout/RedundantLineBreak: + Enabled: false + +Layout/RescueEnsureAlignment: + Enabled: true + +Layout/SingleLineBlockChain: + Enabled: false + +Layout/SpaceAfterColon: + Enabled: true + +Layout/SpaceAfterComma: + Enabled: true + +Layout/SpaceAfterMethodName: + Enabled: true + +Layout/SpaceAfterNot: + Enabled: true + +Layout/SpaceAfterSemicolon: + Enabled: true + +Layout/SpaceAroundBlockParameters: + Enabled: true + EnforcedStyleInsidePipes: no_space + +Layout/SpaceAroundEqualsInParameterDefault: + Enabled: true + EnforcedStyle: space + +Layout/SpaceAroundKeyword: + Enabled: true + +Layout/SpaceAroundMethodCallOperator: + Enabled: true + +Layout/SpaceAroundOperators: + Enabled: true + AllowForAlignment: true + +Layout/SpaceBeforeBlockBraces: + Enabled: true + EnforcedStyle: space + EnforcedStyleForEmptyBraces: space + +Layout/SpaceBeforeBrackets: + Enabled: false + +Layout/SpaceBeforeComma: + Enabled: true + +Layout/SpaceBeforeComment: + Enabled: true + +Layout/SpaceBeforeFirstArg: + Enabled: true + AllowForAlignment: true + +Layout/SpaceBeforeSemicolon: + Enabled: true + +Layout/SpaceInLambdaLiteral: + Enabled: true + EnforcedStyle: require_no_space + +Layout/SpaceInsideArrayLiteralBrackets: + Enabled: true + EnforcedStyle: no_space + EnforcedStyleForEmptyBrackets: no_space + +Layout/SpaceInsideArrayPercentLiteral: + Enabled: true + +Layout/SpaceInsideBlockBraces: + Enabled: true + EnforcedStyle: space + EnforcedStyleForEmptyBraces: no_space + SpaceBeforeBlockParameters: true + +Layout/SpaceInsideHashLiteralBraces: + Enabled: true + EnforcedStyle: no_space + EnforcedStyleForEmptyBraces: no_space + +Layout/SpaceInsideParens: + Enabled: true + EnforcedStyle: no_space + +Layout/SpaceInsidePercentLiteralDelimiters: + Enabled: true + +Layout/SpaceInsideRangeLiteral: + Enabled: true + +Layout/SpaceInsideReferenceBrackets: + Enabled: true + EnforcedStyle: no_space + EnforcedStyleForEmptyBrackets: no_space + +Layout/SpaceInsideStringInterpolation: + Enabled: true + EnforcedStyle: no_space + +Layout/TrailingEmptyLines: + Enabled: true + EnforcedStyle: final_newline + +Layout/TrailingWhitespace: + Enabled: true + AllowInHeredoc: true + +Lint/AmbiguousAssignment: + Enabled: true + +Lint/AmbiguousBlockAssociation: + Enabled: false + +Lint/AmbiguousOperator: + Enabled: true + +Lint/AmbiguousOperatorPrecedence: + Enabled: false + +Lint/AmbiguousRange: + Enabled: false + +Lint/AmbiguousRegexpLiteral: + Enabled: true + +Lint/AssignmentInCondition: + Enabled: true + AllowSafeAssignment: true + # Intentionally disable autocorrect to force us to intentionally decide + # whether assignment is intended as opposed to comparison + AutoCorrect: false + +Lint/BigDecimalNew: + Enabled: true + +Lint/BinaryOperatorWithIdenticalOperands: + Enabled: true + +Lint/BooleanSymbol: + Enabled: true + +Lint/CircularArgumentReference: + Enabled: true + +Lint/ConstantDefinitionInBlock: + Enabled: true + +Lint/ConstantOverwrittenInRescue: + Enabled: true + +Lint/ConstantResolution: + Enabled: false + +Lint/Debugger: + Enabled: true + +Lint/DeprecatedClassMethods: + Enabled: true + +Lint/DeprecatedConstants: + Enabled: true + +Lint/DeprecatedOpenSSLConstant: + Enabled: true + +Lint/DisjunctiveAssignmentInConstructor: + Enabled: false + +Lint/DuplicateBranch: + Enabled: false + +Lint/DuplicateCaseCondition: + Enabled: true + +Lint/DuplicateElsifCondition: + Enabled: true + +Lint/DuplicateHashKey: + Enabled: true + +Lint/DuplicateMagicComment: + Enabled: true + +Lint/DuplicateMatchPattern: + Enabled: false + +Lint/DuplicateMethods: + Enabled: true + +Lint/DuplicateRegexpCharacterClassElement: + Enabled: true + +Lint/DuplicateRequire: + Enabled: true + +Lint/DuplicateRescueException: + Enabled: true + +Lint/EachWithObjectArgument: + Enabled: true + +Lint/ElseLayout: + Enabled: true + +Lint/EmptyBlock: + Enabled: false + +Lint/EmptyClass: + Enabled: false + +Lint/EmptyConditionalBody: + Enabled: false + +Lint/EmptyEnsure: + Enabled: true + +Lint/EmptyExpression: + Enabled: true + +Lint/EmptyFile: + Enabled: false + +Lint/EmptyInPattern: + Enabled: false + +Lint/EmptyInterpolation: + Enabled: true + +Lint/EmptyWhen: + Enabled: true + AllowComments: true + +Lint/EnsureReturn: + Enabled: true + +Lint/ErbNewArguments: + Enabled: true + +Lint/FlipFlop: + Enabled: true + +Lint/FloatComparison: + Enabled: true + +Lint/FloatOutOfRange: + Enabled: true + +Lint/FormatParameterMismatch: + Enabled: true + +Lint/HashCompareByIdentity: + Enabled: false + +Lint/HeredocMethodCallPosition: + Enabled: false + +Lint/IdentityComparison: + Enabled: true + +Lint/ImplicitStringConcatenation: + Enabled: true + +Lint/IncompatibleIoSelectWithFiberScheduler: + Enabled: false + +Lint/IneffectiveAccessModifier: + Enabled: true + +Lint/InheritException: + Enabled: true + EnforcedStyle: runtime_error + +Lint/InterpolationCheck: + Enabled: true + +Lint/ItWithoutArgumentsInBlock: + Enabled: true + +Lint/LambdaWithoutLiteralBlock: + Enabled: false + +Lint/LiteralAsCondition: + Enabled: true + +Lint/LiteralAssignmentInCondition: + Enabled: true + +Lint/LiteralInInterpolation: + Enabled: true + +Lint/Loop: + Enabled: true + +Lint/MissingCopEnableDirective: + Enabled: true + MaximumRangeSize: .inf + +Lint/MissingSuper: + Enabled: false + +Lint/MixedCaseRange: + Enabled: true + +Lint/MixedRegexpCaptureTypes: + Enabled: true + +Lint/MultipleComparison: + Enabled: true + +Lint/NestedMethodDefinition: + Enabled: true + +Lint/NestedPercentLiteral: + Enabled: true + +Lint/NextWithoutAccumulator: + Enabled: true + +Lint/NoReturnInBeginEndBlocks: + Enabled: false + +Lint/NonAtomicFileOperation: + Enabled: false + +Lint/NonDeterministicRequireOrder: + Enabled: true + +Lint/NonLocalExitFromIterator: + Enabled: true + +Lint/NumberConversion: + Enabled: false + +Lint/NumberedParameterAssignment: + Enabled: true + +Lint/OrAssignmentToConstant: + Enabled: true + +Lint/OrderedMagicComments: + Enabled: true + +Lint/OutOfRangeRegexpRef: + Enabled: true + +Lint/ParenthesesAsGroupedExpression: + Enabled: true + +Lint/PercentStringArray: + Enabled: false + +Lint/PercentSymbolArray: + Enabled: true + +Lint/RaiseException: + Enabled: true + +Lint/RandOne: + Enabled: true + +Lint/RedundantCopDisableDirective: + Enabled: false + +Lint/RedundantCopEnableDirective: + Enabled: false + +Lint/RedundantDirGlobSort: + Enabled: false + +Lint/RedundantRegexpQuantifiers: + Enabled: true + +Lint/RedundantRequireStatement: + Enabled: true + +Lint/RedundantSafeNavigation: + Enabled: false + +Lint/RedundantSplatExpansion: + Enabled: true + +Lint/RedundantStringCoercion: + Enabled: true + +Lint/RedundantWithIndex: + Enabled: true + +Lint/RedundantWithObject: + Enabled: true + +Lint/RefinementImportMethods: + Enabled: true + +Lint/RegexpAsCondition: + Enabled: true + +Lint/RequireParentheses: + Enabled: true + +Lint/RequireRangeParentheses: + Enabled: true + +Lint/RequireRelativeSelfPath: + Enabled: true + +Lint/RescueException: + Enabled: true + +Lint/RescueType: + Enabled: true + +Lint/ReturnInVoidContext: + Enabled: true + +Lint/SafeNavigationChain: + Enabled: true + AllowedMethods: + - present? + - blank? + - presence + - try + - try! + +Lint/SafeNavigationConsistency: + Enabled: true + AllowedMethods: + - present? + - blank? + - presence + - try + - try! + +Lint/SafeNavigationWithEmpty: + Enabled: true + +Lint/ScriptPermission: + Enabled: false + +Lint/SelfAssignment: + Enabled: true + +Lint/SendWithMixinArgument: + Enabled: false + +Lint/ShadowedArgument: + Enabled: true + IgnoreImplicitReferences: false + +Lint/ShadowedException: + Enabled: true + +Lint/ShadowingOuterLocalVariable: + Enabled: false + +Lint/StructNewOverride: + Enabled: false + +Lint/SuppressedException: + Enabled: false + +Lint/SymbolConversion: + Enabled: true + +Lint/Syntax: + Enabled: true + +Lint/ToEnumArguments: + Enabled: false + +Lint/ToJSON: + Enabled: false + +Lint/TopLevelReturnWithArgument: + Enabled: true + +Lint/TrailingCommaInAttributeDeclaration: + Enabled: true + +Lint/TripleQuotes: + Enabled: true + +Lint/UnderscorePrefixedVariableName: + Enabled: true + +Lint/UnexpectedBlockArity: + Enabled: false + +Lint/UnifiedInteger: + Enabled: true + +Lint/UnmodifiedReduceAccumulator: + Enabled: false + +Lint/UnreachableCode: + Enabled: true + +Lint/UnreachableLoop: + Enabled: false + +Lint/UnusedBlockArgument: + Enabled: false + +Lint/UnusedMethodArgument: + Enabled: false + +Lint/UriEscapeUnescape: + Enabled: true + +Lint/UriRegexp: + Enabled: true + +Lint/UselessAccessModifier: + Enabled: false + +Lint/UselessAssignment: + Enabled: true + +Lint/UselessElseWithoutRescue: + Enabled: false + +Lint/UselessMethodDefinition: + Enabled: false + +Lint/UselessRescue: + Enabled: true + +Lint/UselessRuby2Keywords: + Enabled: true + +Lint/UselessSetterCall: + Enabled: true + +Lint/UselessTimes: + Enabled: true + +Lint/Void: + Enabled: true + CheckForMethodsWithNoSideEffects: false + +Metrics/AbcSize: + Enabled: false + +Metrics/BlockLength: + Enabled: false + +Metrics/BlockNesting: + Enabled: false + +Metrics/ClassLength: + Enabled: false + +Metrics/CollectionLiteralLength: + Enabled: false + +Metrics/CyclomaticComplexity: + Enabled: false + +Metrics/MethodLength: + Enabled: false + +Metrics/ModuleLength: + Enabled: false + +Metrics/ParameterLists: + Enabled: false + +Metrics/PerceivedComplexity: + Enabled: false + +Migration/DepartmentName: + Enabled: true + +Naming/AccessorMethodName: + Enabled: false + +Naming/AsciiIdentifiers: + Enabled: false + +Naming/BinaryOperatorParameterName: + Enabled: true + +Naming/BlockForwarding: + Enabled: false + +Naming/BlockParameterName: + Enabled: true + MinNameLength: 1 + AllowNamesEndingInNumbers: true + AllowedNames: [] + ForbiddenNames: [] + +Naming/ClassAndModuleCamelCase: + Enabled: true + +Naming/ConstantName: + Enabled: true + +Naming/FileName: + Enabled: false + +Naming/HeredocDelimiterCase: + Enabled: true + EnforcedStyle: uppercase + +Naming/HeredocDelimiterNaming: + Enabled: false + +Naming/InclusiveLanguage: + Enabled: false + +Naming/MemoizedInstanceVariableName: + Enabled: false + +Naming/MethodName: + Enabled: false + +Naming/MethodParameterName: + Enabled: false + +Naming/PredicateName: + Enabled: false + +Naming/RescuedExceptionsVariableName: + Enabled: false + +Naming/VariableName: + Enabled: true + EnforcedStyle: snake_case + +Naming/VariableNumber: + Enabled: false + +Security/CompoundHash: + Enabled: true + +Security/Eval: + Enabled: true + +Security/IoMethods: + Enabled: false + +Security/JSONLoad: + Enabled: true + +Security/MarshalLoad: + Enabled: false + +Security/Open: + Enabled: true + +Security/YAMLLoad: + Enabled: true + +Style/AccessModifierDeclarations: + Enabled: false + +Style/AccessorGrouping: + Enabled: false + +Style/Alias: + Enabled: true + EnforcedStyle: prefer_alias_method + +Style/AndOr: + Enabled: true + +Style/ArgumentsForwarding: + Enabled: true + +Style/ArrayCoercion: + Enabled: false + +Style/ArrayFirstLast: + Enabled: false + +Style/ArrayIntersect: + Enabled: false + +Style/ArrayJoin: + Enabled: true + +Style/AsciiComments: + Enabled: false + +Style/Attr: + Enabled: true + +Style/AutoResourceCleanup: + Enabled: false + +Style/BarePercentLiterals: + Enabled: true + EnforcedStyle: bare_percent + +Style/BeginBlock: + Enabled: true + +Style/BisectedAttrAccessor: + Enabled: false + +Style/BlockComments: + Enabled: true + +Style/BlockDelimiters: + Enabled: false + +Style/CaseEquality: + Enabled: false + +Style/CaseLikeIf: + Enabled: false + +Style/CharacterLiteral: + Enabled: true + +Style/ClassAndModuleChildren: + Enabled: false + +Style/ClassCheck: + Enabled: true + EnforcedStyle: is_a? + +Style/ClassEqualityComparison: + Enabled: true + +Style/ClassMethods: + Enabled: true + +Style/ClassMethodsDefinitions: + Enabled: false + +Style/ClassVars: + Enabled: false + +Style/CollectionCompact: + Enabled: false + +Style/CollectionMethods: + Enabled: false + +Style/ColonMethodCall: + Enabled: true + +Style/ColonMethodDefinition: + Enabled: true + +Style/CombinableLoops: + Enabled: false + +Style/CommandLiteral: + Enabled: true + EnforcedStyle: mixed + AllowInnerBackticks: false + +Style/CommentAnnotation: + Enabled: false + +Style/CommentedKeyword: + Enabled: false + +Style/ComparableClamp: + Enabled: true + +Style/ConcatArrayLiterals: + Enabled: false + +Style/ConditionalAssignment: + Enabled: true + EnforcedStyle: assign_to_condition + SingleLineConditionsOnly: true + IncludeTernaryExpressions: true + +Style/ConstantVisibility: + Enabled: false + +Style/Copyright: + Enabled: false + +Style/DataInheritance: + Enabled: false + +Style/DateTime: + Enabled: false + +Style/DefWithParentheses: + Enabled: true + +Style/Dir: + Enabled: true + +Style/DirEmpty: + Enabled: true + +Style/DisableCopsWithinSourceCodeDirective: + Enabled: false + +Style/DocumentDynamicEvalDefinition: + Enabled: false + +Style/Documentation: + Enabled: false + +Style/DocumentationMethod: + Enabled: false + +Style/DoubleCopDisableDirective: + Enabled: false + +Style/DoubleNegation: + Enabled: false + +Style/EachForSimpleLoop: + Enabled: true + +Style/EachWithObject: + Enabled: true + +Style/EmptyBlockParameter: + Enabled: true + +Style/EmptyCaseCondition: + Enabled: true + +Style/EmptyElse: + Enabled: true + AllowComments: true + EnforcedStyle: both + +Style/EmptyHeredoc: + Enabled: false + +Style/EmptyLambdaParameter: + Enabled: true + +Style/EmptyLiteral: + Enabled: true + +Style/EmptyMethod: + Enabled: true + EnforcedStyle: expanded + +Style/Encoding: + Enabled: true + +Style/EndBlock: + Enabled: true + +Style/EndlessMethod: + Enabled: false + +Style/EnvHome: + Enabled: false + +Style/EvalWithLocation: + Enabled: true + +Style/EvenOdd: + Enabled: false + +Style/ExactRegexpMatch: + Enabled: true +Style/ExpandPathArguments: + Enabled: false + +Style/ExplicitBlockArgument: + Enabled: false + +Style/ExponentialNotation: + Enabled: false + +Style/FetchEnvVar: + Enabled: false + +Style/FileEmpty: + Enabled: false + +Style/FileRead: + Enabled: true + +Style/FileWrite: + Enabled: true + +Style/FloatDivision: + Enabled: false + +Style/For: + Enabled: true + EnforcedStyle: each + +Style/FormatString: + Enabled: false + +Style/FormatStringToken: + Enabled: false + +Style/FrozenStringLiteralComment: + Enabled: false + +Style/GlobalStdStream: + Enabled: true + +Style/GlobalVars: + Enabled: true + AllowedVariables: [] + +Style/GuardClause: + Enabled: false + +Style/HashAsLastArrayItem: + Enabled: false + +Style/HashConversion: + Enabled: true + +Style/HashEachMethods: + Enabled: false + +Style/HashExcept: + Enabled: true + +Style/HashLikeCase: + Enabled: false + +Style/HashSyntax: + Enabled: true + EnforcedStyle: ruby19_no_mixed_keys + EnforcedShorthandSyntax: either + +Style/HashTransformKeys: + Enabled: false + +Style/HashTransformValues: + Enabled: false + +Style/IdenticalConditionalBranches: + Enabled: true + +Style/IfInsideElse: + Enabled: true + +Style/IfUnlessModifier: + Enabled: false + +Style/IfUnlessModifierOfIfUnless: + Enabled: true + +Style/IfWithBooleanLiteralBranches: + Enabled: true + +Style/IfWithSemicolon: + Enabled: true + +Style/ImplicitRuntimeError: + Enabled: false + +Style/InPatternThen: + Enabled: false + +Style/InfiniteLoop: + Enabled: true + +Style/InlineComment: + Enabled: false + +Style/InverseMethods: + Enabled: false + +Style/InvertibleUnlessCondition: + Enabled: false + +Style/IpAddresses: + Enabled: false + +Style/KeywordParametersOrder: + Enabled: true + +Style/Lambda: + Enabled: false + +Style/LambdaCall: + Enabled: true + EnforcedStyle: call + +Style/LineEndConcatenation: + Enabled: true + +Style/MagicCommentFormat: + Enabled: false + +Style/MapCompactWithConditionalBlock: + Enabled: true -inherit_mode: - merge: - - Include +Style/MapToHash: + Enabled: false -AllCops: - DisplayCopNames: true - DisplayStyleGuide: true - NewCops: enable - Include: - - .tomo/**/*.rb - Exclude: - # ignore bin/* except for bin/setup - - !ruby/regexp /<%= Regexp.quote(File.expand_path("bin", __dir__)) %>\/(?!setup).*/ - - .git/**/* - - db/*schema.rb - - log/**/* - - node_modules/**/* - - public/**/* - - storage/**/* - - tmp/**/* - - vendor/**/* +Style/MapToSet: + Enabled: false -Layout/ArgumentAlignment: - EnforcedStyle: with_fixed_indentation +Style/MethodCallWithArgsParentheses: + Enabled: false -Layout/ExtraSpacing: - AllowForAlignment: false - AllowBeforeTrailingComments: true - ForceEqualSignAlignment: false +Style/MethodCallWithoutArgsParentheses: + Enabled: true + AllowedMethods: [] -Layout/FirstArrayElementIndentation: - EnforcedStyle: consistent +Style/MethodCalledOnDoEndBlock: + Enabled: false -Layout/FirstArrayElementLineBreak: +Style/MethodDefParentheses: + Enabled: false + +Style/MinMax: + Enabled: false + +Style/MinMaxComparison: + Enabled: false + +Style/MissingElse: + Enabled: false + +Style/MissingRespondToMissing: Enabled: true -Layout/FirstHashElementLineBreak: +Style/MixinGrouping: Enabled: true + EnforcedStyle: separated -Layout/FirstMethodArgumentLineBreak: +Style/MixinUsage: Enabled: true -Layout/HashAlignment: - EnforcedHashRocketStyle: key - EnforcedColonStyle: key - EnforcedLastArgumentHashStyle: always_inspect +Style/ModuleFunction: + Enabled: false -Layout/LineLength: - Exclude: - - config/initializers/content_security_policy.rb +Style/MultilineBlockChain: + Enabled: false -Layout/MultilineArrayLineBreaks: +Style/MultilineIfModifier: Enabled: true -Layout/MultilineHashKeyLineBreaks: +Style/MultilineIfThen: Enabled: true -Layout/MultilineMethodArgumentLineBreaks: +Style/MultilineInPatternThen: + Enabled: false + +Style/MultilineMemoization: Enabled: true + EnforcedStyle: keyword -Layout/MultilineMethodCallIndentation: - EnforcedStyle: indented +Style/MultilineMethodSignature: + Enabled: false -Layout/MultilineOperationIndentation: - EnforcedStyle: indented +Style/MultilineTernaryOperator: + Enabled: false -Layout/SpaceInsideHashLiteralBraces: - EnforcedStyle: no_space - EnforcedStyleForEmptyBraces: no_space +Style/MultilineWhenThen: + Enabled: true -Lint/AmbiguousBlockAssociation: +Style/MultipleComparison: Enabled: false -Lint/DuplicateBranch: +Style/MutableConstant: Enabled: false -Lint/UselessAccessModifier: - ContextCreatingMethods: - - concerning - MethodCreatingMethods: - - delegate +Style/NegatedIf: + Enabled: false -Metrics/AbcSize: +Style/NegatedIfElseCondition: Enabled: false -Metrics/BlockLength: - Max: 25 - Exclude: - - config/**/* - - test/**/* +Style/NegatedUnless: + Enabled: false -Metrics/ClassLength: - Max: 200 - Exclude: - - test/**/* +Style/NegatedWhile: + Enabled: true -Metrics/CyclomaticComplexity: +Style/NestedFileDirname: + Enabled: true + +Style/NestedModifier: + Enabled: true + +Style/NestedParenthesizedCalls: + Enabled: true + AllowedMethods: + - be + - be_a + - be_an + - be_between + - be_falsey + - be_kind_of + - be_instance_of + - be_truthy + - be_within + - eq + - eql + - end_with + - include + - match + - raise_error + - respond_to + - start_with + +Style/NestedTernaryOperator: + Enabled: true + +Style/Next: Enabled: false -Metrics/MethodLength: - Max: 25 - Exclude: - - bin/setup - - db/migrate/* - - test/**/* +Style/NilComparison: + Enabled: true + EnforcedStyle: predicate -Metrics/ModuleLength: - Max: 200 - Exclude: - - config/**/* +Style/NilLambda: + Enabled: true -Metrics/ParameterLists: - Max: 6 +Style/NonNilCheck: + Enabled: true + IncludeSemanticChanges: false -Metrics/PerceivedComplexity: - Max: 8 - Exclude: - - bin/setup +Style/Not: + Enabled: true -Minitest/AssertPredicate: +Style/NumberedParameters: Enabled: false -Minitest/AssertTruthy: +Style/NumberedParametersLimit: Enabled: false -Minitest/EmptyLineBeforeAssertionMethods: +Style/NumericLiteralPrefix: + Enabled: true + EnforcedOctalStyle: zero_with_o + +Style/NumericLiterals: Enabled: false -Minitest/MultipleAssertions: +Style/NumericPredicate: Enabled: false -Minitest/RefuteFalse: +Style/ObjectThen: Enabled: false -Minitest/RefutePredicate: +Style/OneLineConditional: + Enabled: true + +Style/OpenStructUse: Enabled: false -Naming/FileName: - Exclude: - - .tomo/plugins/*.rb +Style/OperatorMethodCall: + Enabled: false -Naming/MemoizedInstanceVariableName: +Style/OptionHash: Enabled: false -Naming/VariableNumber: +Style/OptionalArguments: + Enabled: true + +Style/OptionalBooleanParameter: Enabled: false -Rails/ApplicationRecord: - Exclude: - - db/migrate/** +Style/OrAssignment: + Enabled: true -Rails/BulkChangeTable: +Style/ParallelAssignment: Enabled: false -Rails/DefaultScope: +Style/ParenthesesAroundCondition: + Enabled: true + AllowSafeAssignment: true + AllowInMultilineConditions: false + +Style/PercentLiteralDelimiters: Enabled: true + PreferredDelimiters: + default: () + "%i": "[]" + "%I": "[]" + "%r": "{}" + "%w": "[]" + "%W": "[]" + +Style/PercentQLiterals: + Enabled: false -Rails/Delegate: +Style/PerlBackrefs: Enabled: false -Rails/EnvironmentVariableAccess: +Style/PreferredHashMethods: Enabled: false -Rails/HasAndBelongsToMany: +Style/Proc: + Enabled: true + +Style/QuotedSymbols: + Enabled: true + EnforcedStyle: same_as_string_literals + +Style/RaiseArgs: Enabled: false -Rails/HttpStatus: +Style/RandomWithOffset: + Enabled: true + +Style/RedundantArgument: Enabled: false -Rails/I18nLocaleTexts: +Style/RedundantArrayConstructor: + Enabled: true + +Style/RedundantAssignment: + Enabled: true + +Style/RedundantBegin: + Enabled: true + +Style/RedundantCapitalW: Enabled: false -Rails/Inquiry: +Style/RedundantCondition: + Enabled: true + +Style/RedundantConditional: + Enabled: true + +Style/RedundantConstantBase: Enabled: false -Rails/NotNullColumn: +Style/RedundantCurrentDirectoryInPath: + Enabled: true + +Style/RedundantDoubleSplatHashBraces: + Enabled: true + +Style/RedundantEach: Enabled: false -Rails/RakeEnvironment: +Style/RedundantException: + Enabled: true + +Style/RedundantFetchBlock: Enabled: false -Rails/RefuteMethods: +Style/RedundantFileExtensionInRequire: + Enabled: true + +Style/RedundantFilterChain: Enabled: false -Rails/RequireDependency: +Style/RedundantFreeze: + Enabled: true + +Style/RedundantHeredocDelimiterQuotes: Enabled: true -Rails/RootPathnameMethods: +Style/RedundantInitialize: Enabled: false -Rails/SkipsModelValidations: +Style/RedundantInterpolation: + Enabled: true + +Style/RedundantLineContinuation: + Enabled: true + +Style/RedundantParentheses: + Enabled: true + +Style/RedundantPercentQ: + Enabled: true + +Style/RedundantRegexpArgument: + Enabled: true + +Style/RedundantRegexpCharacterClass: + Enabled: true + +Style/RedundantRegexpConstructor: + Enabled: true + +Style/RedundantRegexpEscape: + Enabled: true + +Style/RedundantReturn: + Enabled: true + AllowMultipleReturnValues: false + +Style/RedundantSelf: + Enabled: true + +Style/RedundantSelfAssignment: Enabled: false -Rails/Validation: +Style/RedundantSelfAssignmentBranch: Enabled: false -Style/Alias: +Style/RedundantSort: + Enabled: true + +Style/RedundantSortBy: + Enabled: true + +Style/RedundantStringEscape: + Enabled: true + +Style/RegexpLiteral: Enabled: false -Style/AsciiComments: +Style/RequireOrder: Enabled: false -Style/ClassAndModuleChildren: +Style/RescueModifier: + Enabled: true + +Style/RescueStandardError: + Enabled: true + EnforcedStyle: implicit + +Style/ReturnNil: Enabled: false -Style/Documentation: +Style/ReturnNilInPredicateMethodDefinition: Enabled: false -Style/DoubleNegation: +Style/SafeNavigation: + Enabled: true + ConvertCodeThatCanStartToReturnNil: false + AllowedMethods: + - present? + - blank? + - presence + - try + - try! + +Style/Sample: + Enabled: true + +Style/SelectByRegexp: Enabled: false -Style/EmptyMethod: - EnforcedStyle: expanded +Style/SelfAssignment: + Enabled: true -Style/FetchEnvVar: +Style/Semicolon: + Enabled: true + AllowAsExpressionSeparator: false + +Style/Send: Enabled: false -Style/FormatStringToken: +Style/SignalException: Enabled: false -Style/FrozenStringLiteralComment: +Style/SingleArgumentDig: Enabled: false -Style/GuardClause: +Style/SingleLineBlockParams: Enabled: false -Style/IfUnlessModifier: +Style/SingleLineDoEndBlock: Enabled: false -Style/ModuleFunction: +Style/SingleLineMethods: + Enabled: true + AllowIfMethodIsEmpty: false + +Style/SlicingWithRange: + Enabled: true + +Style/SoleNestedConditional: Enabled: false -Style/NumericPredicate: +Style/SpecialGlobalVars: Enabled: false -Style/PerlBackrefs: +Style/StabbyLambdaParentheses: + Enabled: true + EnforcedStyle: require_parentheses + +Style/StaticClass: Enabled: false -Style/RescueStandardError: - EnforcedStyle: implicit +Style/StderrPuts: + Enabled: true -Style/SingleLineMethods: - AllowIfMethodIsEmpty: false +Style/StringChars: + Enabled: true Style/StringConcatenation: Enabled: false +Style/StringHashKeys: + Enabled: false + Style/StringLiterals: + Enabled: true EnforcedStyle: double_quotes + ConsistentQuotesInMultiline: false Style/StringLiteralsInInterpolation: + Enabled: true EnforcedStyle: double_quotes +Style/StringMethods: + Enabled: false + +Style/Strip: + Enabled: true + +Style/StructInheritance: + Enabled: false + +Style/SuperWithArgsParentheses: + Enabled: true + +Style/SwapValues: + Enabled: false + Style/SymbolArray: Enabled: false +Style/SymbolLiteral: + Enabled: true + +Style/SymbolProc: + Enabled: false + +Style/TernaryParentheses: + Enabled: true + EnforcedStyle: require_parentheses_when_complex + AllowSafeAssignment: true + +Style/TopLevelMethodDefinition: + Enabled: false + +Style/TrailingBodyOnClass: + Enabled: true + +Style/TrailingBodyOnMethodDefinition: + Enabled: true + +Style/TrailingBodyOnModule: + Enabled: true + +Style/TrailingCommaInArguments: + Enabled: true + EnforcedStyleForMultiline: no_comma + +Style/TrailingCommaInArrayLiteral: + Enabled: true + EnforcedStyleForMultiline: no_comma + +Style/TrailingCommaInBlockArgs: + Enabled: true + +Style/TrailingCommaInHashLiteral: + Enabled: true + EnforcedStyleForMultiline: no_comma + +Style/TrailingMethodEndStatement: + Enabled: true + +Style/TrailingUnderscoreVariable: + Enabled: false + Style/TrivialAccessors: + Enabled: true + ExactNameMatch: true AllowPredicates: true + AllowDSLWriters: false + IgnoreClassMethods: true + AllowedMethods: + - to_ary + - to_a + - to_c + - to_enum + - to_h + - to_hash + - to_i + - to_int + - to_io + - to_open + - to_path + - to_proc + - to_r + - to_regexp + - to_str + - to_s + - to_sym + +Style/UnlessElse: + Enabled: true + +Style/UnlessLogicalOperators: + Enabled: true + EnforcedStyle: forbid_mixed_logical_operators + +Style/UnpackFirst: + Enabled: true + +Style/VariableInterpolation: + Enabled: true + +Style/WhenThen: + Enabled: true + +Style/WhileUntilDo: + Enabled: true + +Style/WhileUntilModifier: + Enabled: false + +Style/WordArray: + Enabled: false + +Style/YAMLFileRead: + Enabled: true + +Style/YodaCondition: + Enabled: true + EnforcedStyle: forbid_for_all_comparison_operators Style/YodaExpression: Enabled: false + +Style/ZeroLengthPredicate: + Enabled: false diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index b516f83..e7e202d 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -1,5 +1,5 @@ <% provide(:title, "Home") %> -
Find me in app/views/home/index.html.erb
diff --git a/config/routes.rb b/config/routes.rb index d7d6bb7..20b2c5c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -4,7 +4,7 @@ # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500. # Can be used by load balancers and uptime monitors to verify that the app is live. - get "up" => "rails/health#show", as: :rails_health_check + get "up" => "rails/health#show", :as => :rails_health_check # Defines the root path route ("/") # root "posts#index"