Skip to content

Commit

Permalink
Reinstate Rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
lloeki committed May 6, 2024
1 parent e5834df commit 8b85bd2
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 5 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/lint.yml → .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Lint
name: Check

on:
push:

jobs:
lint:
name: Standard Lint
check:
name: Check code
runs-on: ubuntu-latest

steps:
Expand All @@ -15,5 +15,7 @@ jobs:
with:
ruby-version: "3.3.1"
bundler-cache: true
- name: Run the lint task
- name: Lint with StandardRB
run: bundle exec rake standard
- name: Lint with Rubocop
run: bundle exec rake rubocop
17 changes: 17 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
require:
- standard
- standard-custom
- standard-performance
- rubocop-performance
- rubocop-rake
- rubocop-minitest

inherit_gem:
standard: config/base.yml
standard-custom: config/base.yml
standard-performance: config/base.yml

AllCops:
TargetRubyVersion: 2.5
SuggestExtensions: false
NewCops: enable
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ group :test do
end

group :check do
gem "rubocop", "~> 1.62.1", require: false
gem "rubocop-minitest", "~> 0.33.0", require: false
gem "rubocop-rake", "~> 0.6.0", require: false
gem "standard", "~> 1.0", require: false
gem "steep", "~> 1.6.0", require: false
end
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Dir.glob(File.join(__dir__ || Dir.pwd, "tasks", "*.rake")) { |f| import f }
task default: [:test, :check]

desc "Run checks"
task check: [:standard, :"steep:check"]
task check: [:standard, :rubocop, :"steep:check"]
7 changes: 7 additions & 0 deletions tasks/rubocop.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

# @type self: Rake::DSL

require "rubocop/rake_task"

RuboCop::RakeTask.new

0 comments on commit 8b85bd2

Please sign in to comment.