Bugzilla – Attachment 179459 Details for
Bug 39367
Add POD to all subroutines/methods
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39367: Add POD coverage tests
Bug-39367-Add-POD-coverage-tests.patch (text/plain), 1.97 KB, created by
Jonathan Druart
on 2025-03-18 15:32:39 UTC
(
hide
)
Description:
Bug 39367: Add POD coverage tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-03-18 15:32:39 UTC
Size:
1.97 KB
patch
obsolete
>From 72b2d822ad846dcc3a67e7a717d7ec3a3d3d0ab5 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 18 Mar 2025 16:24:17 +0100 >Subject: [PATCH] Bug 39367: Add POD coverage tests > >--- > xt/author/pod_coverage.t | 48 ++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 48 insertions(+) > create mode 100755 xt/author/pod_coverage.t > >diff --git a/xt/author/pod_coverage.t b/xt/author/pod_coverage.t >new file mode 100755 >index 00000000000..c995e5b723a >--- /dev/null >+++ b/xt/author/pod_coverage.t >@@ -0,0 +1,48 @@ >+#!/usr/bin/env perl >+ >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. >+ >+use Modern::Perl; >+use Test::More; >+use Test::NoWarnings; >+use Pod::Coverage; >+ >+# Note that we are using Pod::Coverage instead of Test::Pod::Coverage >+# We do not want to fail if no pod exists in the file. >+# That could be a next step >+ >+my @files; >+push @files, qx{git ls-files '*.pm'}; >+chomp for @files; >+ >+plan tests => scalar(@files) + 1; >+ >+for my $file (@files) { >+ my @uncovered = check_pod_coverage($file); >+ is( scalar(@uncovered), 0, "POD coverage for $file" ) or diag( join ", ", @uncovered ); >+ >+} >+ >+sub check_pod_coverage { >+ my ($file) = @_; >+ >+ my $package_name = $file; >+ $package_name =~ s|/|::|g; >+ $package_name =~ s|\.pm$||; >+ >+ my $coverage = Pod::Coverage->new( package => $package_name ); >+ return $coverage->uncovered; >+} >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39367
:
179451
|
179452
|
179453
|
179456
|
179457
|
179458
|
179459
|
179460
|
179544
|
179545
|
179546
|
179547
|
179548
|
179549
|
180089
|
180090
|
180091
|
180092
|
180093
|
180094
|
181238