Run podchecker on .pm files

RESOLVED FIXED in Bugzilla 2.20

Status

()

--
enhancement
RESOLVED FIXED
16 years ago
6 years ago

People

(Reporter: bbaetz, Assigned: LpSolit)

Tracking

2.17.1
Bugzilla 2.20
Bug Flags:
approval +
approval2.20 +

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

16 years ago
Now that we have perldocs, we should check that the POD is valid.
(Assignee)

Comment 1

14 years ago
I agree. Maybe should this be a test for runtests.pl.
(Assignee)

Comment 2

14 years ago
Created attachment 190375 [details] [diff] [review]
011podchecker.t, v1

implement POD docs syntax validation.
Assignee: zach → LpSolit
Status: NEW → ASSIGNED
Attachment #190375 - Flags: review?(mkanat)
(Assignee)

Updated

14 years ago
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → Bugzilla 2.22
(Assignee)

Updated

14 years ago
Attachment #190375 - Flags: review?(mkanat) → review?(jouni)
Comment on attachment 190375 [details] [diff] [review]
011podchecker.t, v1

>+# Contributor(s): Fr�d�ric Buclin <LpSolit@gmail.com>

Please convert non-ASCII characters to UTF-8.
It's not a template, but we should set a good example in other files, too.

>+    $file =~ s/\s.*$//; # nuke everything after the first space (#comment)
>+    next if (!$file); # skip null entries

I've seen these two lines in other .t files, too, so it probably does make some
sense. Can you tell me what it's good for?

>+    } elsif (!$good_pod) {
>+        ok(1,"$file has correct POD docs syntax");

This reads weird -- "if not good, then file is correct"... Perhaps the variable
should be named $error_count or something, and checked against zero.
(Assignee)

Updated

14 years ago
Attachment #190375 - Flags: review?(jouni)
(Assignee)

Comment 4

14 years ago
Created attachment 190381 [details] [diff] [review]
011podchecker.t, v2

My name converted to UTF-8 and $good_pod replaced by $error_count.

About the two lines you mentioned, I have no idea! :)
Attachment #190375 - Attachment is obsolete: true
Attachment #190381 - Flags: review?(wurblzap)
Comment on attachment 190381 [details] [diff] [review]
011podchecker.t, v2

The code is good now.

The file should be named 010podchecker.t (or even better 010pod.t -- we may
want to add some other POD tests some time).

In order to go in, the patch needs to include POD error fixes.

>+        ok(1,"$file does not contain any POD docs");
>+        ok(1,"$file has correct POD docs syntax");
>+        ok(0,"$file has incorrect POD docs syntax --ERROR");

Nit: perlpod tells me POD means Plain Old Documentation, so "POD docs" seems
redundant to me, "POD" should do it.
Attachment #190381 - Flags: review?(wurblzap) → review-
(In reply to comment #4)
> About the two lines you mentioned, I have no idea! :)

So that's probably another bug, then.
As discussed on IRC, the patch can get r+ without the POD fixes. Setting
dependency on bug 301967 -- approval (or at least checkin) should wait for bug
301967.
Depends on: 301967
(Assignee)

Comment 8

14 years ago
Created attachment 190383 [details] [diff] [review]
011pod.t, v3

file renamed as pod.t and superfluous "docs" word removed.
Attachment #190381 - Attachment is obsolete: true
Attachment #190383 - Flags: review?(wurblzap)
Comment on attachment 190383 [details] [diff] [review]
011pod.t, v3

Good thing to have.

As discussed on IRC, numbering stays at 11 to leave room for the test bug
247560 plans to introduce.
Attachment #190383 - Flags: review?(wurblzap) → review+
(Assignee)

Updated

14 years ago
Flags: approval?
Flags: approval? → approval+
(Assignee)

Comment 10

14 years ago
RCS file: /cvsroot/mozilla/webtools/bugzilla/t/011pod.t,v
done
Checking in t/011pod.t;
/cvsroot/mozilla/webtools/bugzilla/t/011pod.t,v  <--  011pod.t
initial revision: 1.1
done
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
Bug 301967 is going to land on the trunk, so I think it makes sense to land this
one there as well.
Flags: approval2.20?
This seems like a feature we can live without on the branch, simplifying our
testing efforts, no?
Flags: approval2.20? → approval2.20+
(Assignee)

Comment 13

14 years ago
2.20rc1:

Checking in t/011pod.t;
/cvsroot/mozilla/webtools/bugzilla/t/011pod.t,v  <--  011pod.t
new revision: 1.1.2.2; previous revision: 1.1.2.1
done
Target Milestone: Bugzilla 2.22 → Bugzilla 2.20
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.