Skip to content

Commit 66627a3

Browse files
committed
Upgraded RuboCop to 1.80.2.
1 parent bd3e97c commit 66627a3

3 files changed

Lines changed: 25 additions & 7 deletions

File tree

.rubocop_todo.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2023-07-26 19:57:49 UTC using RuboCop version 1.47.0.
3+
# on 2025-09-22 12:03:02 UTC using RuboCop version 1.80.2.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
88

9+
# Offense count: 2
10+
# Configuration parameters: Severity.
11+
Bundler/DuplicatedGroup:
12+
Exclude:
13+
- 'Gemfile'
14+
915
# Offense count: 1
10-
# Configuration parameters: Severity, Include.
11-
# Include: **/*.gemspec
16+
# Configuration parameters: Severity.
1217
Gemspec/RequiredRubyVersion:
1318
Exclude:
1419
- 'slack-ruby-bot-server.gemspec'
@@ -38,12 +43,18 @@ Lint/ConstantDefinitionInBlock:
3843
Exclude:
3944
- 'lib/slack-ruby-bot-server/models/team/methods.rb'
4045

46+
# Offense count: 1
47+
Lint/UselessDefined:
48+
Exclude:
49+
- 'lib/slack-ruby-bot-server/ext/bson/object_id.rb'
50+
4151
# Offense count: 1
4252
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
4353
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src
4454
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
4555
Naming/FileName:
4656
Exclude:
57+
- 'Rakefile.rb'
4758
- 'lib/slack-ruby-bot-server.rb'
4859

4960
# Offense count: 1
@@ -62,14 +73,21 @@ Naming/MethodParameterName:
6273
- 'lib/slack-ruby-bot-server/models/team/mongoid.rb'
6374
- 'lib/slack-ruby-bot-server/service.rb'
6475

65-
# Offense count: 5
76+
# Offense count: 6
6677
# This cop supports safe autocorrection (--autocorrect).
6778
# Configuration parameters: EnforcedStyle.
6879
# SupportedStyles: separated, grouped
6980
Style/AccessorGrouping:
7081
Exclude:
7182
- 'lib/slack-ruby-bot-server/config.rb'
7283

84+
# Offense count: 2
85+
# This cop supports unsafe autocorrection (--autocorrect-all).
86+
Style/CollectionQuerying:
87+
Exclude:
88+
- 'lib/slack-ruby-bot-server/api/helpers/error_helpers.rb'
89+
- 'lib/slack-ruby-bot-server/api/helpers/sort_helpers.rb'
90+
7391
# Offense count: 3
7492
# This cop supports unsafe autocorrection (--autocorrect-all).
7593
Style/GlobalStdStream:

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ group :development, :test do
4040
gem 'rack-test'
4141
gem 'rake'
4242
gem 'rspec'
43-
gem 'rubocop', '1.47'
43+
gem 'rubocop', '1.80.2'
4444
gem 'selenium-webdriver', '~> 4.1.0'
4545
gem 'vcr'
4646
gem 'webmock'

lib/slack-ruby-bot-server/api/helpers/sort_helpers.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def sort_order(options = {})
1313
supported_sort_orders = route_sort
1414
error!("This API doesn't support sorting", 400) if supported_sort_orders.blank?
1515
unless supported_sort_orders.include?(sort_order)
16-
error!("Invalid sort order: #{sort_order}, must be#{supported_sort_orders.count == 1 ? '' : ' one of'} '#{supported_sort_orders.join("', '")}'", 400)
16+
error!("Invalid sort order: #{sort_order}, must be#{' one of' unless supported_sort_orders.count == 1} '#{supported_sort_orders.join("', '")}'", 400)
1717
end
1818
end
1919
sort_order = sort_order.split(',').map do |sort_entry|
@@ -50,7 +50,7 @@ def sort(coll, options = {})
5050
error!("Cannot sort #{coll.class.name}", 500)
5151
end
5252
end
53-
coll = coll.is_a?(Module) && coll.respond_to?(:all) ? coll.all : coll
53+
coll = coll.all if coll.is_a?(Module) && coll.respond_to?(:all)
5454
end
5555
end
5656
end

0 commit comments

Comments
 (0)