lib/git/lint/cli/actions/analyze/branch.rb in git-lint-5.3.0 vs lib/git/lint/cli/actions/analyze/branch.rb in git-lint-6.0.0
- old
+ new
@@ -1,21 +1,27 @@
# frozen_string_literal: true
+require "sod"
+
module Git
module Lint
module CLI
module Actions
module Analyze
# Handles analyze action for branch.
- class Branch
+ class Branch < Sod::Action
include Git::Lint::Import[:kernel, :logger]
+ description "Analyze current branch."
+
+ on %w[-b --branch]
+
def initialize(analyzer: Analyzer.new, **)
super(**)
@analyzer = analyzer
end
- def call
+ def call(*)
parse
rescue Errors::Base => error
logger.error { error.message }
kernel.abort
end