Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion .rubocop_cc.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -208,6 +214,8 @@ Lint/RedundantDirGlobSort:
Enabled: true
Lint/RedundantRegexpQuantifiers:
Enabled: true
Lint/RedundantTypeConversion:
Enabled: true
Lint/RefinementImportMethods:
Enabled: true
Lint/RequireRangeParentheses:
Expand All @@ -216,6 +224,8 @@ Lint/RequireRelativeSelfPath:
Enabled: true
Lint/SharedMutableDefault:
Enabled: true
Lint/SuppressedExceptionInNumberConversion:
Enabled: true
Lint/SymbolConversion:
Enabled: true
Lint/ToEnumArguments:
Expand Down Expand Up @@ -254,6 +264,8 @@ Style/CollectionCompact:
Enabled: true
Style/CombinableDefined:
Enabled: true
Style/ComparableBetween:
Enabled: true
Style/ComparableClamp:
Enabled: true
Style/ConcatArrayLiterals:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -342,6 +358,8 @@ Style/RedundantEach:
Enabled: true
Style/RedundantFilterChain:
Enabled: true
Style/RedundantFormat:
Enabled: true
Style/RedundantHeredocDelimiterQuotes:
Enabled: true
Style/RedundantInitialize:
Expand Down Expand Up @@ -424,6 +442,8 @@ Rails/MatchRoute:
Enabled: true
Rails/MigrationClassName:
Enabled: true
Rails/MultipleRoutePaths:
Enabled: true
Rails/NegateInclude:
Enabled: true
Rails/Pluck:
Expand Down Expand Up @@ -454,6 +474,8 @@ Rails/SquishedSQLHeredocs:
Enabled: true
Rails/StripHeredoc:
Enabled: true
Rails/StrongParametersExpect:
Enabled: true
Rails/ThreeStateBooleanColumn:
Enabled: true
Rails/TimeZoneAssignment:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion app/presenters/error_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down