Closed
Bug 555438
Opened 15 years ago
Closed 9 years ago
Improve the Bugzilla code base using Perl::Critic
Categories
(Bugzilla :: Testing Suite, enhancement)
Bugzilla
Testing Suite
Tracking
()
RESOLVED
FIXED
Bugzilla 6.0
People
(Reporter: szabgab, Assigned: dylan)
References
Details
Attachments
(1 file, 2 obsolete files)
3.96 KB,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8
Build Identifier:
Perl::Critic and Test::Perl::Critic have been used for many years for defining policies regarding the code base of Perl projects. The way it could work is to add a Test::Perl::Critic based test script to xt/ along with the configuration file defining the rules you want to use. Then configure the automated smoke testing to run these tests.
I created a set of rules based on what we have in Padre and disabled all the rules that are currently violated in the Bugzilla code base. If you accept the idea of code improvement using Perl::Critic then please add these files to xt/ and check if they indeed pass the tests by running:
RELEASE_TESTING=1 prove xt/
Configure the Tinderbox to run these tests (and install Test::Perl::Critic).
Then start removing the policies that are currently violated and start fixing the issues in the code base.
Reproducible: Always
Reporter | ||
Comment 1•15 years ago
|
||
Attachment #435375 -
Flags: review?
Reporter | ||
Comment 2•15 years ago
|
||
Attachment #435376 -
Flags: review?
![]() |
||
Updated•15 years ago
|
Attachment #435375 -
Attachment mime type: text/troff → text/plain
![]() |
||
Updated•15 years ago
|
Attachment #435376 -
Attachment mime type: application/octet-stream → text/plain
Comment 3•15 years ago
|
||
szabgab: It's best to request review from somebody specific, or it's likely to never happen.
OS: Linux → All
Hardware: x86 → All
Comment 4•15 years ago
|
||
I've run some Bugzilla files through Perl::Critic before, and I disagreed with almost all the recommendations. So I'm somewhat skeptical, but it could still be valuable. Like you said, we can disable policies we disagree with.
BTW, I'd rather just have the tests in t/ and do a skip_all if the environment variable isn't set.
![]() |
||
Updated•13 years ago
|
Assignee: general → testing
Component: Bugzilla-General → Testing Suite
![]() |
||
Comment 5•13 years ago
|
||
There is a clear consensus amongst core developers against using Perl::Critic. We all agree that if we don't want to follow a rule, we will remove/relax it, making this RFE useless. Thanks for suggesting that, though.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
![]() |
||
Updated•13 years ago
|
Attachment #435375 -
Flags: review?
![]() |
||
Updated•13 years ago
|
Attachment #435376 -
Flags: review?
Assignee | ||
Comment 7•11 years ago
|
||
Per IRC discussion with Frédéric Buclin, re-opening this bug. We can make apply only the policies that there is a consensus about, and ignore that ones that we disagree with.
Assignee: testing → dylan
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: WONTFIX → ---
Assignee | ||
Comment 8•9 years ago
|
||
This includes the suggestions from Gabor from 6 years ago -- protected under a RELEASE_TESTING=1 flag for now. With that enabled, this test will not pass but I think the errors it brings up should be discussed first (from a historical perspective of Bugzilla aspect as well). I'm very keen to fix the warnings it produces and then "tighten the screws".
Attachment #435375 -
Attachment is obsolete: true
Attachment #435376 -
Attachment is obsolete: true
Attachment #8711489 -
Flags: review?(dkl)
Comment 9•9 years ago
|
||
Comment on attachment 8711489 [details] [diff] [review]
555438_1.patch
Review of attachment 8711489 [details] [diff] [review]:
-----------------------------------------------------------------
r=dkl
Attachment #8711489 -
Flags: review?(dkl) → review+
Assignee | ||
Comment 10•9 years ago
|
||
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
39d8526..a0f345b master -> master
Assignee | ||
Updated•9 years ago
|
Status: REOPENED → RESOLVED
Closed: 13 years ago → 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Bugzilla 6.0
You need to log in
before you can comment on or make changes to this bug.
Description
•