Module: Hashira::CLI::FailOn
- Defined in:
- lib/hashira/cli/fail_on.rb
Constant Summary collapse
- MEASURES =
(Hashira::Pipeline::ANALYZERS - %i[coupling smells]).map(&:to_s).freeze
- KINDS =
{ "cycles" => "cycle", "sdp" => "sdp_violation", "dupe" => "duplication", **Hashira::Pipeline::STRUCTURAL.to_h { [it, it] }, **MEASURES.to_h { [it, it] }, "smells" => Hashira::Pipeline::SMELLS, **Hashira::Pipeline::SMELLS.to_h { [it, it] } }.freeze
- OWNERS =
{ **Hashira::Pipeline::STRUCTURAL.to_h { [it, :coupling] }, **MEASURES.to_h { [it, it.to_sym] }, **Hashira::Pipeline::SMELLS.to_h { [it, :smells] } }.freeze
Class Method Summary collapse
Class Method Details
.kind(name) ⇒ Object
32 33 34 35 36 |
# File 'lib/hashira/cli/fail_on.rb', line 32 def kind(name) KINDS.fetch(name) do raise(Hashira::Error, "unknown --fail-on kind #{name.inspect} (use: #{KINDS.keys.join(", ")})") end end |
.owner(kind) ⇒ Object
30 |
# File 'lib/hashira/cli/fail_on.rb', line 30 def owner(kind) = OWNERS.fetch(kind) |