diff --git a/.rubocop_cc.yml b/.rubocop_cc.yml index aacb12342f9..7f64109c24e 100644 --- a/.rubocop_cc.yml +++ b/.rubocop_cc.yml @@ -1,12 +1,14 @@ # Cloud Controller Specific Rubocop Config -require: +plugins: - rubocop-sequel - rubocop-rails - rubocop-capybara - rubocop-factory_bot - rubocop-rspec - rubocop-rspec_rails + +require: - ./spec/linters/migration/add_constraint_name.rb - ./spec/linters/migration/include_string_size.rb - ./spec/linters/migration/require_primary_key.rb @@ -160,10 +162,14 @@ Lint/AmbiguousOperatorPrecedence: Enabled: true Lint/AmbiguousRange: Enabled: true +Lint/ArrayLiteralInRegexp: + Enabled: true Lint/ConstantOverwrittenInRescue: Enabled: true Lint/ConstantReassignment: Enabled: true +Lint/CopDirectiveSyntax: + Enabled: true Lint/DeprecatedConstants: Enabled: true Lint/DuplicateBranch: @@ -208,6 +214,8 @@ Lint/RedundantDirGlobSort: Enabled: true Lint/RedundantRegexpQuantifiers: Enabled: true +Lint/RedundantTypeConversion: + Enabled: true Lint/RefinementImportMethods: Enabled: true Lint/RequireRangeParentheses: @@ -216,6 +224,8 @@ Lint/RequireRelativeSelfPath: Enabled: true Lint/SharedMutableDefault: Enabled: true +Lint/SuppressedExceptionInNumberConversion: + Enabled: true Lint/SymbolConversion: Enabled: true Lint/ToEnumArguments: @@ -254,6 +264,8 @@ Style/CollectionCompact: Enabled: true Style/CombinableDefined: Enabled: true +Style/ComparableBetween: + Enabled: true Style/ComparableClamp: Enabled: true Style/ConcatArrayLiterals: @@ -290,12 +302,16 @@ Style/HashConversion: Enabled: true Style/HashExcept: Enabled: true +Style/HashFetchChain: + Enabled: true Style/IfWithBooleanLiteralBranches: Enabled: true Style/InPatternThen: Enabled: true Style/ItAssignment: Enabled: true +Style/ItBlockParameter: + Enabled: true Style/KeywordArgumentsMerging: Enabled: true Style/MagicCommentFormat: @@ -342,6 +358,8 @@ Style/RedundantEach: Enabled: true Style/RedundantFilterChain: Enabled: true +Style/RedundantFormat: + Enabled: true Style/RedundantHeredocDelimiterQuotes: Enabled: true Style/RedundantInitialize: @@ -424,6 +442,8 @@ Rails/MatchRoute: Enabled: true Rails/MigrationClassName: Enabled: true +Rails/MultipleRoutePaths: + Enabled: true Rails/NegateInclude: Enabled: true Rails/Pluck: @@ -454,6 +474,8 @@ Rails/SquishedSQLHeredocs: Enabled: true Rails/StripHeredoc: Enabled: true +Rails/StrongParametersExpect: + Enabled: true Rails/ThreeStateBooleanColumn: Enabled: true Rails/TimeZoneAssignment: @@ -482,10 +504,14 @@ Rails/WhereNotWithMultipleConditions: Enabled: true Capybara/ClickLinkOrButtonStyle: Enabled: false +Capybara/FindAllFirst: + Enabled: true Capybara/MatchStyle: Enabled: false Capybara/NegationMatcher: Enabled: false +Capybara/NegationMatcherAfterVisit: + Enabled: true Capybara/RedundantWithinFind: Enabled: true Capybara/SpecificActions: diff --git a/app/presenters/error_presenter.rb b/app/presenters/error_presenter.rb index 5dcb71abf36..697e46b8fa6 100644 --- a/app/presenters/error_presenter.rb +++ b/app/presenters/error_presenter.rb @@ -8,7 +8,7 @@ def initialize(error, test_mode=false, error_hasher=V2ErrorHasher.new(error)) end def client_error? - response_code >= 400 && response_code <= 499 + response_code.between?(400, 499) end def log_message