From dcc88fe8f733884379f384ba375df6a93ff6ca14 Mon Sep 17 00:00:00 2001 From: bbrtj Date: Sat, 27 Jul 2024 19:04:39 +0200 Subject: [PATCH] Tidy up, add CI action for checking code tidiness --- .github/workflows/ci.yml | 5 +++++ t/500-subforms/01-default.t | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6fe5929..865a034 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,6 +41,11 @@ jobs: perl -v cpanm -v + - name: Check if the code is tidy + if: ${{ startsWith(matrix.runner, 'ubuntu-') && startsWith(matrix.perl, '5.36') }} + run: | + cpanm --notest Perl::Tidy Code::TidyAll + tidyall -a --check-only - name: Install Test::More if: ${{ startsWith( matrix.perl, '5.10') }} run: | diff --git a/t/500-subforms/01-default.t b/t/500-subforms/01-default.t index e3797da..346f426 100644 --- a/t/500-subforms/01-default.t +++ b/t/500-subforms/01-default.t @@ -63,7 +63,7 @@ subtest 'testing default' => sub { }; subtest 'testing default with error' => sub { - my $form = Form::Parent->new(subform_default => { value1 => [] }); + my $form = Form::Parent->new(subform_default => {value1 => []}); $form->set_input({}); my $err = try sub {