Skip to content

Commit

Permalink
Add new rubocop checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Nov 9, 2021
1 parent 3b75ed6 commit 01e6523
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 7 deletions.
56 changes: 56 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,59 @@ Style/StringChars: # new in 1.12
Enabled: true
Style/SwapValues: # new in 1.1
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
RSpec/ExcessiveDocstringSpacing: # new in 2.5
Enabled: true
RSpec/IdenticalEqualityAssertion: # new in 2.4
Enabled: true
RSpec/SubjectDeclaration: # new in 2.5
Enabled: true
RSpec/Rails/AvoidSetupHook: # new in 2.4
Enabled: true
33 changes: 26 additions & 7 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2021-11-09 18:58:52 UTC using RuboCop version 1.22.3.
# on 2021-11-09 19:03:56 UTC using RuboCop version 1.22.3.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand Down Expand Up @@ -252,12 +252,6 @@ RSpec/VariableDefinition:
Exclude:
- 'spec/features/screenshot_feature.rb'

# Offense count: 1
# Configuration parameters: IgnoredPatterns.
# SupportedStyles: snake_case, camelCase
RSpec/VariableName:
EnforcedStyle: snake_case

# Offense count: 11
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
RSpec/VerifiedDoubles:
Expand All @@ -281,6 +275,15 @@ Rails/ActiveRecordAliases:
- 'spec/models/delivery_spec.rb'
- 'spec/services/email_services/send_spec.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/ActiveRecordCallbacksOrder:
Exclude:
- 'app/models/app.rb'
- 'app/models/email.rb'

# Offense count: 13
# Cop supports --auto-correct.
Rails/ApplicationRecord:
Expand Down Expand Up @@ -380,6 +383,14 @@ Rails/InverseOf:
- 'app/models/delivery.rb'
- 'app/models/email.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: Include.
# Include: config/routes.rb, config/routes/**/*.rb
Rails/MatchRoute:
Exclude:
- 'config/routes.rb'

# Offense count: 22
# Cop supports --auto-correct.
# Configuration parameters: Include.
Expand Down Expand Up @@ -450,3 +461,11 @@ Rails/TimeZone:
- 'spec/models/delivery_spec.rb'
- 'spec/models/postfix_log_line_spec.rb'
- 'spec/services/postfix_log_line_services/create_spec.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: exists, where
Rails/WhereExists:
Exclude:
- 'app/policies/application_policy.rb'

0 comments on commit 01e6523

Please sign in to comment.