-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR makes rubocop-sequel support RuboCop's Plugin feature. It replaces the ad-hoc `Inject` with RuboCop plugins introduced in RuboCop 1.72. Additionally, since RuboCop already requires Ruby 2.7 or higher as its runtime, the `required_ruby_version` will be updated to 2.7. Follow-up rubocop/rubocop#13792
- Loading branch information
Showing
7 changed files
with
45 additions
and
27 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 |
---|---|---|
|
@@ -11,6 +11,8 @@ jobs: | |
- 3.0 | ||
- 3.1 | ||
- 3.2 | ||
- 3.3 | ||
- 3.4 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ruby/setup-ruby@v1 | ||
|
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'lint_roller' | ||
|
||
module RuboCop | ||
module Sequel | ||
# A plugin that integrates rubocop-sequel with RuboCop's plugin system. | ||
class Plugin < LintRoller::Plugin | ||
def about | ||
LintRoller::About.new( | ||
name: 'rubocop-sequel', | ||
version: Version::STRING, | ||
homepage: 'https://github.com/rubocop/rubocop-sequel', | ||
description: 'Code style checking for Sequel.' | ||
) | ||
end | ||
|
||
def supported?(context) | ||
context.engine == :rubocop | ||
end | ||
|
||
def rules(_context) | ||
LintRoller::Rules.new( | ||
type: :path, | ||
config_format: :rubocop, | ||
value: Pathname.new(__dir__).join('../../../config/default.yml') | ||
) | ||
end | ||
end | ||
end | ||
end |
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