Lint/Rule/MissingConcurrency.pm untested

filter: Statementstmt 0.0% 0 / 19 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 9 Podpod 0.0% 0 / 5 totaltotal 0.0% 0 / 35 CC 2 SCAR 10.3
CC
2
Cov
0%
check_workflow
6.0
id
2.0
description
2.0
CRAP 2.8
1 package App::Workflow::Lint::Rule::MissingConcurrency;
2  
3 use strict;
4 use warnings;
5 use Carp qw(croak carp);
6 use parent 'App::Workflow::Lint::Rule';
7  
8 sub id { 'missing-concurrency' }
9 sub description { 'Workflow should define a concurrency group' }
10 sub applies_to { 'workflow' }
11 sub level { 'info' }
12  
13 sub check_workflow {
14 my ($self, $wf, $ctx) = @_;
15  
16 return () if exists $wf->{concurrency};
17  
18 return $self->diag(
19 message => "Workflow is missing a concurrency group",
20 path => '/',
21 file => $ctx->{file},
22 );
23 }
24  
25 1;
26