chore(rubocop): enable most of new rails cops
This commit is contained in:
parent
ca11ec8380
commit
923923f67d
1 changed files with 110 additions and 4 deletions
114
.rubocop.yml
114
.rubocop.yml
|
@ -14,6 +14,7 @@ AllCops:
|
|||
TargetRubyVersion: 3.1
|
||||
DisabledByDefault: true
|
||||
SuggestExtensions: false
|
||||
NewCops: enable
|
||||
Include:
|
||||
- "app/**/*.prawn"
|
||||
Exclude:
|
||||
|
@ -683,9 +684,18 @@ Performance/UriDefaultParser:
|
|||
Rails:
|
||||
Enabled: true
|
||||
|
||||
Rails/ActionControllerFlashBeforeRender:
|
||||
Enabled: true
|
||||
|
||||
Rails/ActionControllerTestCase:
|
||||
Enabled: true
|
||||
|
||||
Rails/ActionFilter:
|
||||
Enabled: true
|
||||
|
||||
Rails/ActionOrder:
|
||||
Enabled: false
|
||||
|
||||
Rails/ActiveRecordAliases:
|
||||
Enabled: true
|
||||
|
||||
|
@ -695,18 +705,24 @@ Rails/ActiveRecordCallbacksOrder:
|
|||
Rails/ActiveSupportAliases:
|
||||
Enabled: true
|
||||
|
||||
Rails/ActiveSupportOnLoad:
|
||||
Enabled: true
|
||||
|
||||
Rails/AddColumnIndex:
|
||||
Enabled: true
|
||||
|
||||
Rails/AfterCommitOverride:
|
||||
Enabled: true
|
||||
|
||||
Rails/ApplicationController:
|
||||
Enabled: false
|
||||
|
||||
Rails/ApplicationJob:
|
||||
Enabled: true
|
||||
|
||||
Rails/ApplicationRecord:
|
||||
Enabled: true
|
||||
|
||||
Rails/ApplicationController:
|
||||
Enabled: false
|
||||
|
||||
Rails/AttributeDefaultBlockValue:
|
||||
Enabled: true
|
||||
|
||||
|
@ -716,6 +732,9 @@ Rails/Blank:
|
|||
Rails/BulkChangeTable:
|
||||
Enabled: false
|
||||
|
||||
Rails/CompactBlank:
|
||||
Enabled: true
|
||||
|
||||
Rails/CreateTableWithTimestamps:
|
||||
Enabled: true
|
||||
Exclude:
|
||||
|
@ -734,10 +753,28 @@ Rails/Delegate:
|
|||
Rails/DelegateAllowBlank:
|
||||
Enabled: true
|
||||
|
||||
Rails/DeprecatedActiveModelErrorsMethods:
|
||||
Enabled: false # re-enable in rails 7
|
||||
|
||||
Rails/DotSeparatedKeys:
|
||||
Enabled: true
|
||||
|
||||
Rails/DuplicateAssociation:
|
||||
Enabled: true
|
||||
|
||||
Rails/DuplicateScope:
|
||||
Enabled: true
|
||||
|
||||
Rails/DurationArithmetic:
|
||||
Enabled: true
|
||||
|
||||
Rails/DynamicFindBy:
|
||||
Enabled: true
|
||||
Exclude:
|
||||
- "spec/system/**/*.rb"
|
||||
- spec/system/**/*.rb
|
||||
|
||||
Rails/EagerEvaluationLogMessage:
|
||||
Enabled: true
|
||||
|
||||
Rails/EnumUniqueness:
|
||||
Enabled: true
|
||||
|
@ -748,6 +785,9 @@ Rails/EnvironmentComparison:
|
|||
Rails/Exit:
|
||||
Enabled: true
|
||||
|
||||
Rails/ExpandedDateRange:
|
||||
Enabled: true
|
||||
|
||||
Rails/FilePath:
|
||||
Enabled: false
|
||||
|
||||
|
@ -760,6 +800,9 @@ Rails/FindById:
|
|||
Rails/FindEach:
|
||||
Enabled: true
|
||||
|
||||
Rails/FreezeTime:
|
||||
Enabled: true
|
||||
|
||||
Rails/HasAndBelongsToMany:
|
||||
Enabled: false
|
||||
|
||||
|
@ -772,6 +815,18 @@ Rails/HttpPositionalArguments:
|
|||
Rails/HttpStatus:
|
||||
Enabled: false
|
||||
|
||||
Rails/I18nLazyLookup:
|
||||
Enabled: true
|
||||
|
||||
Rails/I18nLocaleAssignment:
|
||||
Enabled: true
|
||||
|
||||
Rails/I18nLocaleTexts:
|
||||
Enabled: false
|
||||
|
||||
Rails/IgnoredColumnsAssignment:
|
||||
Enabled: true
|
||||
|
||||
Rails/Inquiry:
|
||||
Enabled: true
|
||||
|
||||
|
@ -787,6 +842,9 @@ Rails/MailerName:
|
|||
Rails/MatchRoute:
|
||||
Enabled: true
|
||||
|
||||
Rails/MigrationClassName:
|
||||
Enabled: true
|
||||
|
||||
Rails/NegateInclude:
|
||||
Enabled: false
|
||||
|
||||
|
@ -823,9 +881,15 @@ Rails/ReadWriteAttribute:
|
|||
Rails/RedundantAllowNil:
|
||||
Enabled: false
|
||||
|
||||
Rails/RedundantPresenceValidationOnBelongsTo:
|
||||
Enabled: true
|
||||
|
||||
Rails/RedundantReceiverInWithOptions:
|
||||
Enabled: true
|
||||
|
||||
Rails/RedundantTravelBack:
|
||||
Enabled: true
|
||||
|
||||
Rails/RelativeDateConstant:
|
||||
Enabled: true
|
||||
|
||||
|
@ -838,9 +902,21 @@ Rails/RenderPlainText:
|
|||
Rails/RequestReferer:
|
||||
Enabled: true
|
||||
|
||||
Rails/ResponseParsedBody:
|
||||
Enabled: true
|
||||
|
||||
Rails/ReversibleMigration:
|
||||
Enabled: false
|
||||
|
||||
Rails/RootJoinChain:
|
||||
Enabled: true
|
||||
|
||||
Rails/RootPathnameMethods:
|
||||
Enabled: true
|
||||
|
||||
Rails/RootPublicPath:
|
||||
Enabled: true
|
||||
|
||||
Rails/SaveBang:
|
||||
Enabled: false
|
||||
|
||||
|
@ -856,9 +932,30 @@ Rails/SkipsModelValidations:
|
|||
Rails/SquishedSQLHeredocs:
|
||||
Enabled: true
|
||||
|
||||
Rails/StripHeredoc:
|
||||
Enabled: true
|
||||
|
||||
Rails/ThreeStateBooleanColumn:
|
||||
Enabled: true
|
||||
|
||||
Rails/TimeZone:
|
||||
EnforcedStyle: strict
|
||||
|
||||
Rails/TimeZoneAssignment:
|
||||
Enabled: true
|
||||
|
||||
Rails/ToFormattedS:
|
||||
Enabled: true
|
||||
|
||||
Rails/ToSWithArgument:
|
||||
Enabled: true
|
||||
|
||||
Rails/TopLevelHashWithIndifferentAccess:
|
||||
Enabled: true
|
||||
|
||||
Rails/TransactionExitStatement:
|
||||
Enabled: true
|
||||
|
||||
Rails/UniqBeforePluck:
|
||||
Enabled: true
|
||||
|
||||
|
@ -868,6 +965,9 @@ Rails/UniqueValidationWithoutIndex:
|
|||
Rails/UnknownEnv:
|
||||
Enabled: false
|
||||
|
||||
Rails/UnusedIgnoredColumns:
|
||||
Enabled: true
|
||||
|
||||
Rails/Validation:
|
||||
Enabled: true
|
||||
|
||||
|
@ -877,9 +977,15 @@ Rails/WhereEquals:
|
|||
Rails/WhereExists:
|
||||
Enabled: true
|
||||
|
||||
Rails/WhereMissing:
|
||||
Enabled: true
|
||||
|
||||
Rails/WhereNot:
|
||||
Enabled: true
|
||||
|
||||
Rails/WhereNotWithMultipleConditions:
|
||||
Enabled: true
|
||||
|
||||
RSpec/Focus:
|
||||
Enabled: true
|
||||
|
||||
|
|
Loading…
Reference in a new issue