Skip to content

Commit

Permalink
fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
htrgouvea committed Jan 4, 2025
1 parent 987dabe commit e2743bf
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/Zarn/Engine/Source_to_Sink.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@ package Zarn::Engine::Source_to_Sink {


if ($ast && $rules) {
my @absence = grep { $_->{type} && $_->{type} eq 'absence' } $rules->@*;
my @absence = grep { $_ -> {type} && $_ -> {type} eq 'absence' } $rules -> @*;

for my $rule (@absence) {
my $category = $rule -> {category};
my $title = $rule -> {name};
my $message = $rule -> {message};

foreach my $token ($rule -> {sample} -> @*) {
if ($ast->content() !~ m/$token/xms ) {

if ($ast -> content() !~ m/$token/xms ) {
push @results, {
category => $category,
title => $title,
Expand All @@ -41,7 +44,7 @@ package Zarn::Engine::Source_to_Sink {
}
}

my @presence = grep { !($_->{type}) || $_->{type} eq 'presence' } $rules->@*;
my @presence = grep { !($_ -> {type}) || $_ -> {type} eq 'presence' } $rules -> @*;

foreach my $token (@{$ast -> find('PPI::Token') || []}) {
foreach my $rule (@presence) {
Expand Down Expand Up @@ -86,4 +89,4 @@ package Zarn::Engine::Source_to_Sink {
}
}

1;
1;

0 comments on commit e2743bf

Please sign in to comment.