Sha256: 0e0526be7e19f55744d36d3d899f9ae7427caa68453998da81559703d9e6a232

Contents?: true

Size: 574 Bytes

Versions: 5

Compression:

Stored size: 574 Bytes

Contents

# rubocop:disable Naming/FileName
# frozen_string_literal: true

command :'setup-linting' do
  desc 'Install git hooks to lint commit messages'

  option '-f', '--force', 'Override existing hooks if they exist' do |_, options|
    options[:force] = true
  end

  action do |context|
    require 'schmersion/repo'
    require 'schmersion/linter'
    repo = Schmersion::Repo.new(FileUtils.pwd)
    linter = Schmersion::Linter.new(repo)
    linter.setup(force: context.options[:force])

    puts 'Installed hooks successfully'.green
  end
end

# rubocop:enable Naming/FileName

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
schmersion-1.1.3 cli/setup-linting.rb
schmersion-1.1.2 cli/setup-linting.rb
schmersion-1.1.0 cli/setup-linting.rb
schmersion-1.0.1 cli/setup-linting.rb
schmersion-1.0.0 cli/setup-linting.rb