mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-04-04 15:14:09 -04:00
Rubocop autocorrections
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config`
|
||||
# on 2026-03-01 05:17:50 UTC using RuboCop version 1.85.0.
|
||||
# on 2026-03-01 05:32:16 UTC using RuboCop version 1.85.0.
|
||||
# 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
|
||||
@@ -75,6 +75,16 @@ FactoryBot/ExcessiveCreateList:
|
||||
FactoryBot/SyntaxMethods:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
||||
# SupportedHashRocketStyles: key, separator, table
|
||||
# SupportedColonStyles: key, separator, table
|
||||
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
||||
Layout/HashAlignment:
|
||||
Exclude:
|
||||
- 'app/models/crop.rb'
|
||||
|
||||
# Offense count: 6
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
||||
@@ -254,12 +264,6 @@ RSpec/ContextMethod:
|
||||
RSpec/ContextWording:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 1
|
||||
# Configuration parameters: IgnoredMetadata.
|
||||
RSpec/DescribeClass:
|
||||
Exclude:
|
||||
- 'spec/tasks/import_spec.rb'
|
||||
|
||||
# Offense count: 36
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: SkipBlocks, EnforcedStyle, OnlyStaticConstants.
|
||||
@@ -643,15 +647,6 @@ Rails/RootPathnameMethods:
|
||||
- 'lib/tasks/import.rake'
|
||||
- 'spec/rails_helper.rb'
|
||||
|
||||
# Offense count: 4
|
||||
# Configuration parameters: ForbiddenMethods, AllowedMethods.
|
||||
# ForbiddenMethods: decrement!, decrement_counter, increment!, increment_counter, insert, insert!, insert_all, insert_all!, toggle!, touch, touch_all, update_all, update_attribute, update_column, update_columns, update_counters, upsert, upsert_all
|
||||
Rails/SkipsModelValidations:
|
||||
Exclude:
|
||||
- 'db/migrate/20240101010102_populate_crop_fields_from_openfarm_data.rb'
|
||||
- 'db/migrate/20240810160538_set_default_language_for_existing_alternate_names.rb'
|
||||
- 'db/migrate/20251128200506_add_description_to_crops.rb'
|
||||
|
||||
# Offense count: 21
|
||||
Rails/ThreeStateBooleanColumn:
|
||||
Enabled: false
|
||||
|
||||
@@ -61,7 +61,7 @@ class Crop < ApplicationRecord
|
||||
},
|
||||
if: :approved?
|
||||
validates :en_youtube_url,
|
||||
format: {
|
||||
format: {
|
||||
with: %r{\A(?:https?://)?(?:www\.)?(?:youtube(?:-nocookie)?\.com/(?:(?:v|e(?:mbed)?)/|\S*?[?&]v=)|youtu\.be/)[a-zA-Z0-9_-]{11}(?:[?&]\S*)?\z},
|
||||
message: 'is not a valid YouTube URL'
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user