Skip to content
Snippets Groups Projects
Verified Commit a58bfec0 authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- improved '## no critic' to fix perlcritic warning

parent 330d809f
No related branches found
No related tags found
No related merge requests found
...@@ -67,7 +67,7 @@ sub opt_spec { ...@@ -67,7 +67,7 @@ sub opt_spec {
); );
return (@global_opts, [], @local_opts); return (@global_opts, [], @local_opts);
} }
sub validate_args { ## no critic CognitiveComplexity::ProhibitExcessCognitiveComplexity sub validate_args { ## no critic (CognitiveComplexity::ProhibitExcessCognitiveComplexity)
my ($self, $opt, $args) = @_; my ($self, $opt, $args) = @_;
SLUB::LZA::TA::common_global_validate($self, $opt, $args); SLUB::LZA::TA::common_global_validate($self, $opt, $args);
# no args allowed but options! # no args allowed but options!
......
...@@ -27,7 +27,7 @@ sub opt_spec { ...@@ -27,7 +27,7 @@ sub opt_spec {
return (@global_opts, [], @local_opts); return (@global_opts, [], @local_opts);
} }
sub validate_args { ## no critic CognitiveComplexity::ProhibitExcessCognitiveComplexity sub validate_args { ## no critic (CognitiveComplexity::ProhibitExcessCognitiveComplexity)
my ($self, $opt, $args) = @_; my ($self, $opt, $args) = @_;
# no args allowed but options! # no args allowed but options!
$self->usage_error("No args allowed") if @$args; $self->usage_error("No args allowed") if @$args;
......
...@@ -117,7 +117,7 @@ sub opt_spec { ...@@ -117,7 +117,7 @@ sub opt_spec {
); );
return (@global_opts, [], @local_opts); return (@global_opts, [], @local_opts);
} }
sub validate_args { ## no critic CognitiveComplexity::ProhibitExcessCognitiveComplexity sub validate_args { ## no critic (CognitiveComplexity::ProhibitExcessCognitiveComplexity)
my ($self, $opt, $args) = @_; my ($self, $opt, $args) = @_;
SLUB::LZA::TA::common_global_validate($self, $opt, $args); SLUB::LZA::TA::common_global_validate($self, $opt, $args);
# no args allowed but options! # no args allowed but options!
...@@ -271,7 +271,7 @@ PAINLESS ...@@ -271,7 +271,7 @@ PAINLESS
return $aips_response; return $aips_response;
} }
sub get_ldp_projects { ## no critic CognitiveComplexity::ProhibitExcessCognitiveComplexity sub get_ldp_projects { ## no critic (CognitiveComplexity::ProhibitExcessCognitiveComplexity)
my ($self, $opt, $args) = @_; my ($self, $opt, $args) = @_;
my $query = SLUB::LZA::TA::Archivematica::Elasticsearch::PrepareQuery::prepare_ldpprojects_query(@_); my $query = SLUB::LZA::TA::Archivematica::Elasticsearch::PrepareQuery::prepare_ldpprojects_query(@_);
my $response = SLUB::LZA::TA::Archivematica::Elasticsearch::query_elasticsearch( my $response = SLUB::LZA::TA::Archivematica::Elasticsearch::query_elasticsearch(
...@@ -509,7 +509,7 @@ sub execute { ...@@ -509,7 +509,7 @@ sub execute {
return 1; return 1;
} }
sub prepare_for_table($results, $ldp_projects) { ## no critic CognitiveComplexity::ProhibitExcessCognitiveComplexity sub prepare_for_table($results, $ldp_projects) { ## no critic (CognitiveComplexity::ProhibitExcessCognitiveComplexity)
my @table; my @table;
foreach my $set (SETS) { foreach my $set (SETS) {
foreach my $aip_state (AIPSTATE) { foreach my $aip_state (AIPSTATE) {
...@@ -553,7 +553,7 @@ sub prepare_for_table($results, $ldp_projects) { ## no critic CognitiveComplexit ...@@ -553,7 +553,7 @@ sub prepare_for_table($results, $ldp_projects) { ## no critic CognitiveComplexit
return \@headers, \@table; return \@headers, \@table;
} }
sub print_humanreadable_report ($results) { ## no critic CognitiveComplexity::ProhibitExcessCognitiveComplexity sub print_humanreadable_report ($results) { ## no critic (CognitiveComplexity::ProhibitExcessCognitiveComplexity)
say <<"RPTHEADER"; say <<"RPTHEADER";
:lang: en :lang: en
:doctype: article :doctype: article
......
...@@ -118,8 +118,8 @@ sub opt_spec { ...@@ -118,8 +118,8 @@ sub opt_spec {
); );
return (@global_opts, [], @local_opts); return (@global_opts, [], @local_opts);
} }
sub validate_args { ## no critic CognitiveComplexity::ProhibitExcessCognitiveComplexity
my ($self, $opt, $args) = @_; sub validate_args($self, $opt, $args) { ## no critic qw(CognitiveComplexity::ProhibitExcessCognitiveComplexity Subroutines::ProhibitExcessComplexity)
SLUB::LZA::TA::common_global_validate($self, $opt, $args); SLUB::LZA::TA::common_global_validate($self, $opt, $args);
# no args allowed but options! # no args allowed but options!
$self->usage_error("No args allowed") if @$args; $self->usage_error("No args allowed") if @$args;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment