Skip to content

Commit

Permalink
MàJ rubocop vers 1.69 (#4937)
Browse files Browse the repository at this point in the history
* upgrade rubocop 1.69

* autocorrect Style/RedundantLineContinuation and Style/KeywordArgumentsMerging

* disable Style/SafeNavigationChainLength
  • Loading branch information
adipasquale authored Jan 2, 2025
1 parent 329bc7f commit b6aacb8
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 22 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ Style/ArgumentsForwarding:
Style/ComparableClamp:
Enabled: false

Style/SafeNavigationChainLength:
Enabled: false

# cette vérification serait bien à mettre en place mais il y plus de 20 specs qui ne la respectent pas aujourd’hui
RSpec/NoExpectationExample:
Enabled: false
Expand Down
21 changes: 11 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ GEM
paper_trail (15.2.0)
activerecord (>= 6.1)
request_store (~> 1.4)
parallel (1.22.1)
parallel (1.26.3)
parallel_tests (4.5.1)
parallel
parser (3.3.6.0)
Expand Down Expand Up @@ -527,15 +527,15 @@ GEM
connection_pool
redis-namespace (1.11.0)
redis (>= 4)
regexp_parser (2.8.2)
regexp_parser (2.10.0)
reline (0.5.10)
io-console (~> 0.5)
request_store (1.7.0)
rack (>= 1.4)
responders (3.1.1)
actionpack (>= 5.2)
railties (>= 5.2)
rexml (3.3.9)
rexml (3.4.0)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
Expand Down Expand Up @@ -572,18 +572,17 @@ GEM
rswag-ui (2.13.0)
actionpack (>= 3.1, < 7.2)
railties (>= 3.1, < 7.2)
rubocop (1.65.1)
rubocop (1.69.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.36.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.1)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.37.0)
parser (>= 3.3.1.0)
rubocop-rails (2.26.0)
activesupport (>= 4.2.0)
Expand Down Expand Up @@ -671,7 +670,9 @@ GEM
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
unicode-display_width (3.1.3)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
uniform_notifier (1.16.0)
uri (0.13.0)
validate_email (0.1.6)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/admin/territories/zones_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def index

def new
zone_defaults = { level: params[:default_zone_level] || Zone::LEVEL_CITY }
@zone = Zone.new(**zone_defaults.merge(zone_params_get), sector: @sector)
@zone = Zone.new(**zone_defaults, **zone_params_get, sector: @sector)
@sectors = sector_policy.resolve
authorize(@zone, policy_class: Agent::ZonePolicy)
end
Expand Down
2 changes: 1 addition & 1 deletion scripts/scalingo_scale.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
)
).body
)
error_string = \
error_string =
if res["error"]
res["error"]
elsif res["errors"]
Expand Down
8 changes: 4 additions & 4 deletions spec/mailers/users/rdv_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@

expected_url = prendre_rdv_url(
departement: rdv.organisation.departement_number,
motif_name_with_location_type: rdv.motif.name_with_location_type, \
organisation_ids: [rdv.organisation_id], \
address: rdv.address, \
invitation_token: token, \
motif_name_with_location_type: rdv.motif.name_with_location_type,
organisation_ids: [rdv.organisation_id],
address: rdv.address,
invitation_token: token,
host: Domain::RDV_SOLIDARITES.host_name
)

Expand Down
8 changes: 4 additions & 4 deletions spec/models/concerns/recurrence_concern_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def expect_first_occurrence_to_match(occurrences, expected_boundaries)
recurrence = Montrose.every(:week, interval: 2, starts: first_day)
create(factory,
recurrence: recurrence,
first_day: first_day, \
start_time: Time.zone.parse("8h00"), \
first_day: first_day,
start_time: Time.zone.parse("8h00"),
end_time: Time.zone.parse("12h00"))
period = Date.new(2019, 8, 12)..Date.new(2019, 8, 19)

Expand All @@ -55,8 +55,8 @@ def expect_first_occurrence_to_match(occurrences, expected_boundaries)
first_day = Date.new(2019, 7, 31)
create(factory,
recurrence: nil,
first_day: first_day, \
start_time: Time.zone.parse("8h00"), \
first_day: first_day,
start_time: Time.zone.parse("8h00"),
end_time: Time.zone.parse("12h00"))
period = Date.new(2019, 7, 29)..Date.new(2019, 8, 4)

Expand Down
4 changes: 2 additions & 2 deletions spec/models/plage_ouverture_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@
travel_to(now)
range = (now + 1.week)..(now + 1.week + 30.minutes)
create(:plage_ouverture, first_day: (now - 1.week).to_date,
start_time: Tod::TimeOfDay.new(10, 45), \
end_time: Tod::TimeOfDay.new(11, 45), \
start_time: Tod::TimeOfDay.new(10, 45),
end_time: Tod::TimeOfDay.new(11, 45),
recurrence: Montrose.every(:month, day: { Tuesday: [2] }, starts: (now - 1.week).to_date, interval: 1))
expect(described_class.overlapping_range(range)).to be_empty
end
Expand Down

0 comments on commit b6aacb8

Please sign in to comment.