Skip to content

Commit

Permalink
Merge pull request #39 from sue445/steep
Browse files Browse the repository at this point in the history
Add Steepfile and rbs_collection.yaml
  • Loading branch information
sue445 committed Jul 18, 2023
2 parents 02f8f51 + 3917eb1 commit ce0e8d9
Show file tree
Hide file tree
Showing 10 changed files with 105 additions and 30 deletions.
10 changes: 0 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,3 @@ updates:
interval: weekly
assignees:
- sue445

- package-ecosystem: gitsubmodule
directory: "/"
schedule:
interval: monthly
time: "05:00"
timezone: Asia/Tokyo
open-pull-requests-limit: 99
assignees:
- sue445
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: true

- uses: ruby/setup-ruby@v1
with:
Expand All @@ -44,7 +42,9 @@ jobs:
bundle update --jobs $(nproc) --retry 3
- run: bundle exec rspec
- run: bundle exec rbs collection install
- run: bundle exec rake rbs_validate
# - run: bundle exec rake steep_check # TODO: Do after

- name: Slack Notification (not success)
uses: lazy-actions/slatify@master
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
.rspec_status

Gemfile.lock

.gem_rbs_collection/
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

20 changes: 6 additions & 14 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,12 @@ RSpec::Core::RakeTask.new(:spec)

desc "validate rbs"
task :rbs_validate do
command = %w(
rbs
--repo vendor/rbs/gem_rbs_collection/gems/
-r date
-r forwardable
-r uri
-r faraday:2.5
-r hashie:5.0
-I sig/
validate
--silent
).join(" ")
sh "rbs validate --silent"
end

sh command
desc "check steep"
task :steep_check do
sh "steep check"
end

task default: %i[spec rbs_validate]
task default: %i[spec rbs_validate steep_check]
32 changes: 32 additions & 0 deletions Steepfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# D = Steep::Diagnostic
#
target :lib do
signature "sig"

check "lib" # Directory name
# check "Gemfile" # File name
# check "app/models/**/*.rb" # Glob
# ignore "lib/templates/*.rb"

# library "pathname" # Standard libraries
# library "strong_json" # Gems

library "date"
collection_config "rbs_collection.yaml"

# configure_code_diagnostics(D::Ruby.default) # `default` diagnostics setting (applies by default)
# configure_code_diagnostics(D::Ruby.strict) # `strict` diagnostics setting
# configure_code_diagnostics(D::Ruby.lenient) # `lenient` diagnostics setting
# configure_code_diagnostics(D::Ruby.silent) # `silent` diagnostics setting
# configure_code_diagnostics do |hash| # You can setup everything yourself
# hash[D::Ruby::NoMethod] = :information
# end
end

# target :test do
# signature "sig", "sig-private"
#
# check "test"
#
# # library "pathname" # Standard libraries
# end
1 change: 1 addition & 0 deletions doorkeeper_jp.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "rbs"
spec.add_development_dependency "rspec"
spec.add_development_dependency "rspec-its"
spec.add_development_dependency "steep"
spec.add_development_dependency "webmock"
spec.add_development_dependency "yard"

Expand Down
34 changes: 34 additions & 0 deletions rbs_collection.lock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
sources:
- type: git
name: ruby/gem_rbs_collection
revision: 38cd11a34996d8af780c25eaa52cb857d6b50483
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
path: ".gem_rbs_collection"
gems:
- name: faraday
version: '2.5'
source:
type: git
name: ruby/gem_rbs_collection
revision: 38cd11a34996d8af780c25eaa52cb857d6b50483
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: forwardable
version: '0'
source:
type: stdlib
- name: hashie
version: '5.0'
source:
type: git
name: ruby/gem_rbs_collection
revision: 38cd11a34996d8af780c25eaa52cb857d6b50483
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: uri
version: '0'
source:
type: stdlib
gemfile_lock_path: Gemfile.lock
28 changes: 28 additions & 0 deletions rbs_collection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Download sources
sources:
- type: git
name: ruby/gem_rbs_collection
remote: https://github.com/ruby/gem_rbs_collection.git
revision: main
repo_dir: gems

# You can specify local directories as sources also.
# - type: local
# path: path/to/your/local/repository

# A directory to install the downloaded RBSs
path: .gem_rbs_collection

gems:
# Skip loading rbs gem's RBS.
# It's unnecessary if you don't use rbs as a library.
- name: rbs
ignore: true
- name: steep
ignore: true
- name: doorkeeper_jp
ignore: true
- name: yard
ignore: true
- name: hashie
- name: faraday
1 change: 0 additions & 1 deletion vendor/rbs/gem_rbs_collection
Submodule gem_rbs_collection deleted from 87fba0

0 comments on commit ce0e8d9

Please sign in to comment.