Closed Bug 184037 Opened 22 years ago Closed 19 years ago

Run podchecker on .pm files

Categories

(Bugzilla :: Testing Suite, enhancement)

2.17.1
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: bbaetz, Assigned: LpSolit)

References

Details

Attachments

(1 file, 2 obsolete files)

Now that we have perldocs, we should check that the POD is valid.
I agree. Maybe should this be a test for runtests.pl.
Attached patch 011podchecker.t, v1 (obsolete) — Splinter Review
implement POD docs syntax validation.
Assignee: zach → LpSolit
Status: NEW → ASSIGNED
Attachment #190375 - Flags: review?(mkanat)
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → Bugzilla 2.22
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.
Attachment #190375 - Flags: review?(jouni)
Attached patch 011podchecker.t, v2 (obsolete) — Splinter Review
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
Attached patch 011pod.t, v3Splinter Review
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+
Flags: approval?
Flags: approval? → approval+
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
Closed: 19 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+
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.

Attachment

General

Created:
Updated:
Size: