-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: upgrade rubocop to the latest(1.47.0) * chore: set target ruby version for rubocop chore(ci): correct lint workflow name, use checkout v3 docs: add changelog entry * fix: rubocop complaints * Added support for Ruby 3.2.x. * fix: lock rubocop target ruby version to 2.6 --------- Co-authored-by: Daniel (dB.) Doubrovkine <dblock@dblock.org>
- Loading branch information
1 parent
e56f02d
commit 5560369
Showing
6 changed files
with
134 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
--- | ||
name: test | ||
name: lint | ||
on: [push, pull_request] | ||
jobs: | ||
lint: | ||
name: RuboCop | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7 | ||
ruby-version: '3.1' | ||
bundler-cache: true | ||
- name: Run RuboCop | ||
run: bundle exec rubocop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,173 @@ | ||
# This configuration was generated by | ||
# `rubocop --auto-gen-config` | ||
# on 2020-11-16 09:56:54 -0500 using RuboCop version 0.81.0. | ||
# on 2023-03-02 20:56:34 UTC using RuboCop version 1.47.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 | ||
# versions of RuboCop, may require this file to be generated again. | ||
|
||
# Offense count: 1 | ||
# Cop supports --auto-correct. | ||
# Configuration parameters: EnforcedStyle. | ||
# SupportedStyles: squiggly, active_support, powerpack, unindent | ||
# Configuration parameters: Severity, Include. | ||
# Include: **/*.gemspec | ||
Gemspec/RequiredRubyVersion: | ||
Exclude: | ||
- 'slack-ruby-bot-server.gemspec' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Layout/HeredocIndentation: | ||
Exclude: | ||
- 'lib/slack-ruby-bot-server/info.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Layout/RescueEnsureAlignment: | ||
Exclude: | ||
- 'lib/slack-ruby-bot-server/models/team/methods.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Lint/AmbiguousOperator: | ||
Exclude: | ||
- 'spec/slack-ruby-bot-server/service_spec.rb' | ||
|
||
# Offense count: 2 | ||
# Cop supports --auto-correct. | ||
Lint/NonDeterministicRequireOrder: | ||
# Offense count: 1 | ||
# Configuration parameters: AllowedMethods. | ||
# AllowedMethods: enums | ||
Lint/ConstantDefinitionInBlock: | ||
Exclude: | ||
- 'spec/spec_helper.rb' | ||
- 'lib/slack-ruby-bot-server/models/team/methods.rb' | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms. | ||
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms. | ||
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src | ||
# 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 | ||
Naming/FileName: | ||
Exclude: | ||
- 'lib/slack-ruby-bot-server.rb' | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: ForbiddenDelimiters. | ||
# ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$)) | ||
# ForbiddenDelimiters: (?i-mx:(^|\s)(EO[A-Z]{1}|END)(\s|$)) | ||
Naming/HeredocDelimiterNaming: | ||
Exclude: | ||
- 'lib/slack-ruby-bot-server/info.rb' | ||
|
||
# Offense count: 3 | ||
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. | ||
# AllowedNames: io, id, to, by, on, in, at, ip, db, os, pp | ||
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to | ||
Naming/MethodParameterName: | ||
Exclude: | ||
- 'lib/slack-ruby-bot-server/models/team/activerecord.rb' | ||
- 'lib/slack-ruby-bot-server/models/team/mongoid.rb' | ||
- 'lib/slack-ruby-bot-server/service.rb' | ||
|
||
# Offense count: 5 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle. | ||
# SupportedStyles: separated, grouped | ||
Style/AccessorGrouping: | ||
Exclude: | ||
- 'lib/slack-ruby-bot-server/config.rb' | ||
|
||
# Offense count: 3 | ||
# This cop supports unsafe autocorrection (--autocorrect-all). | ||
Style/GlobalStdStream: | ||
Exclude: | ||
- 'spec/database_adapters/activerecord/activerecord.rb' | ||
- 'tasks/db.rake' | ||
|
||
# Offense count: 18 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. | ||
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys | ||
# SupportedShorthandSyntax: always, never, either, consistent | ||
Style/HashSyntax: | ||
Exclude: | ||
- 'lib/slack-ruby-bot-server/api/endpoints/teams_endpoint.rb' | ||
- 'lib/slack-ruby-bot-server/models/team/methods.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports unsafe autocorrection (--autocorrect-all). | ||
Style/HashTransformKeys: | ||
Exclude: | ||
- 'lib/slack-ruby-bot-server/api/helpers/error_helpers.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports unsafe autocorrection (--autocorrect-all). | ||
Style/HashTransformValues: | ||
Exclude: | ||
- 'lib/slack-ruby-bot-server/api/helpers/error_helpers.rb' | ||
|
||
# Offense count: 1 | ||
# Cop supports --auto-correct. | ||
# This cop supports unsafe autocorrection (--autocorrect-all). | ||
# Configuration parameters: EnforcedStyle, Autocorrect. | ||
# SupportedStyles: module_function, extend_self, forbidden | ||
Style/ModuleFunction: | ||
Exclude: | ||
- 'lib/slack-ruby-bot-server/config.rb' | ||
|
||
# Offense count: 2 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Style/MultilineWhenThen: | ||
Exclude: | ||
- 'Gemfile' | ||
|
||
# Offense count: 1 | ||
# Cop supports --auto-correct. | ||
# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods. | ||
# This cop supports unsafe autocorrection (--autocorrect-all). | ||
# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns. | ||
# SupportedStyles: predicate, comparison | ||
Style/NumericPredicate: | ||
Exclude: | ||
- 'spec/**/*' | ||
- 'lib/slack-ruby-bot-server/service.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Style/RedundantAssignment: | ||
Exclude: | ||
- 'lib/slack-ruby-bot-server/api/helpers/sort_helpers.rb' | ||
|
||
# Offense count: 3 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Style/RedundantBegin: | ||
Exclude: | ||
- 'lib/slack-ruby-bot-server/models/team/activerecord.rb' | ||
- 'lib/slack-ruby-bot-server/models/team/mongoid.rb' | ||
- 'lib/slack-ruby-bot-server/service.rb' | ||
|
||
# Offense count: 2 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Style/RedundantFileExtensionInRequire: | ||
Exclude: | ||
- 'lib/slack-ruby-bot-server/config/database_adapters/activerecord.rb' | ||
- 'lib/slack-ruby-bot-server/config/database_adapters/mongoid.rb' | ||
|
||
# Offense count: 6 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Style/RedundantRegexpEscape: | ||
Exclude: | ||
- 'Rakefile' | ||
- 'lib/slack-ruby-bot-server/api/middleware.rb' | ||
- 'spec/support/api/endpoints/it_behaves_like_a_cursor_api.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports unsafe autocorrection (--autocorrect-all). | ||
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength. | ||
# AllowedMethods: present?, blank?, presence, try, try! | ||
Style/SafeNavigation: | ||
Exclude: | ||
- 'lib/slack-ruby-bot-server/api/endpoints/teams_endpoint.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports unsafe autocorrection (--autocorrect-all). | ||
Style/SlicingWithRange: | ||
Exclude: | ||
- 'lib/slack-ruby-bot-server/api/helpers/sort_helpers.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports unsafe autocorrection (--autocorrect-all). | ||
# Configuration parameters: Mode. | ||
Style/StringConcatenation: | ||
Exclude: | ||
- 'lib/slack-ruby-bot-server/api/helpers/error_helpers.rb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters