-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce rubocop-on-rbs #608
Open
ksss
wants to merge
14
commits into
ruby:main
Choose a base branch
from
ksss:rubocop-on-rbs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
0382f74
Add rubocop-on-rbs
ksss c3c352b
Add rubocop.yml file
ksss 704489a
Apply RuboCop autocorrect
ksss 94b1e2c
Run RuboCop on CI
ksss 3675b01
Exclude vendor for CI
ksss f90b3fc
Update rubocop-on-rbs
ksss d720bb8
Expand cops
ksss df01301
Export rubocop.yml in boilerplate
ksss a4b0b39
Set inherit_from
ksss e913103
Merge remote-tracking branch 'upstream/main' into rubocop-on-rbs
ksss c32d973
Update rubocop-on-rbs
ksss ded932b
Set department only
ksss cd17845
Revert "Apply RuboCop autocorrect"
ksss 730ed13
Remove
ksss File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: RuboCop | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: {} | ||
|
||
jobs: | ||
rubocop: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.3' | ||
bundler-cache: true | ||
- name: 'Install dependencies' | ||
run: 'bundle install' | ||
- name: 'Run RuboCop' | ||
run: 'bundle exec rubocop --format github' |
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,30 @@ | ||
# The behavior of RuboCop can be controlled via the .rubocop.yml | ||
# configuration file. It makes it possible to enable/disable | ||
# certain cops (checks) and to alter their behavior if they accept | ||
# any parameters. The file can be placed either in your home | ||
# directory or in some project directory. | ||
# | ||
# RuboCop will start looking for the configuration file in the directory | ||
# where the inspected file is and continue its way up to the root directory. | ||
# | ||
# See https://docs.rubocop.org/rubocop/configuration | ||
require: | ||
- rubocop-on-rbs | ||
|
||
AllCops: | ||
TargetRubyVersion: 3.3 | ||
NewCops: disable | ||
DisabledByDefault: true | ||
Exclude: | ||
- "**/Steepfile" | ||
- "**/*.rb" | ||
- "**/vendor/**/*" | ||
|
||
RBS: | ||
Enabled: true | ||
RBS/Layout: | ||
Enabled: false | ||
RBS/Lint: | ||
Enabled: false | ||
RBS/Style: | ||
Enabled: false | ||
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 |
---|---|---|
|
@@ -4,3 +4,4 @@ gem "rbs" | |
gem "steep" | ||
gem "typeprof" | ||
gem "rake" | ||
gem 'rubocop-on-rbs' |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me confirm this configuration. Is this configuration for the
RBS
department necessary?I guess we can simply remove these lines because
DisabledByDefault: true
is configured.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove the
RBS
department at here.But we will have to set
Enabled: true
for theRBS
department in the .rubocop.yml under all gems.