Sha256: 274ab49a7cc7cf0d8a8cd706f1b4157f962f85a12913cef3e40bd22dbc570d84

Contents?: true

Size: 759 Bytes

Versions: 3

Compression:

Stored size: 759 Bytes

Contents

# frozen_string_literal: true

require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'

RuboCop::RakeTask.new
RSpec::Core::RakeTask.new(:spec)

desc 'Run Sorbet Typechecker'
task :sorbet do
  sh('bundle exec srb tc')
end

basic_style_cops = %w[
  Layout/TrailingWhitespace
  Layout/SpaceInsideBlockBraces
  Style/StringLiterals
]

desc "Apply #{basic_style_cops.join(', ')}"
task :autocorrect_basic_style_issues do
  sh("bundle exec rubocop -a --only #{basic_style_cops.join(',')}")
end

namespace :ci do
  desc 'Tasks to run in Gitlab CI build stage'
  task build: %i[sorbet rubocop]

  desc 'Tasks to run in Gitlab CI spec stage'
  task spec: %i[spec]
end

task default: %i[autocorrect_basic_style_issues sorbet spec rubocop]

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bhook-0.3.2 Rakefile
bhook-0.3.1 Rakefile
bhook-0.3.0 Rakefile