Class: MetzScan::Analyzers::ServiceSoup
- Inherits:
-
Object
- Object
- MetzScan::Analyzers::ServiceSoup
- Includes:
- ProjectAnalyzerTriage
- Defined in:
- lib/metz_scan/analyzers/service_soup.rb,
lib/metz_scan/analyzers/service_soup/workflow_collector.rb,
lib/metz_scan/analyzers/service_soup/service_call_pattern.rb,
lib/metz_scan/analyzers/service_soup/setup_workflow_triage.rb
Overview
Reports workflow methods that coordinate many service-style calls.
Defined Under Namespace
Modules: SetupWorkflowTriage Classes: Finding, ServiceCallPattern, WorkflowCollector
Constant Summary collapse
- RULE_ID =
"MetzProject/ServiceSoup"- PROJECT_ANALYZER_STATUS =
"validated"- DEFAULT_OUTPUT_ELIGIBLE =
true- CONFIDENCE =
"medium"- TRIAGE_SEVERITY =
"design pressure"- TRIAGE_SUMMARY =
"Validated workflow signal; review methods that coordinate several distinct services."- WHY =
"Service-object soup scatters one workflow across many procedural steps " \ "and makes orchestration harder to change."
- SUGGESTED_NEXT_MOVES =
[ "Introduce a workflow object that owns the multi-step process.", "Keep the controller or job action at one high-level command when possible." ].freeze
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(paths: nil, index: nil, minimum_services: 3) ⇒ ServiceSoup
constructor
A new instance of ServiceSoup.
Constructor Details
#initialize(paths: nil, index: nil, minimum_services: 3) ⇒ ServiceSoup
Returns a new instance of ServiceSoup.
37 38 39 40 41 |
# File 'lib/metz_scan/analyzers/service_soup.rb', line 37 def initialize(paths: nil, index: nil, minimum_services: 3) @paths = Array(paths) @index = index @minimum_services = minimum_services end |
Instance Method Details
#call ⇒ Object
43 44 45 |
# File 'lib/metz_scan/analyzers/service_soup.rb', line 43 def call workflows.filter_map { |workflow| finding_for(workflow) } end |