Bug 5485 - Add a framework for static source code analysis
Summary: Add a framework for static source code analysis
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: PATCH-Sent (DO NOT USE) enhancement (vote)
Assignee: Galen Charlton
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks: 32349
  Show dependency treegraph
 
Reported: 2010-12-13 11:23 UTC by Colin Campbell
Modified: 2022-11-25 08:06 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Signed-off patch (2.20 KB, patch)
2011-03-15 13:45 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Campbell 2010-12-13 11:23:19 UTC
Koha is very poor in test coverage. Add a script that will allow the option of using perlcritic to run static analysis on the perlcode. 

At present most code will fail these tests but using Test::Perl::Critic may encourage use of better practices in the source,

Important that running of the tests is purely optional and does not add dependencies on the end user so script is conditional on setting an environment variable and the requisite module being installed.
Comment 1 MJ Ray (software.coop) 2011-01-08 11:12:56 UTC
This bug is mentioned in:
Bug 5485: Add script to run	Test::Perl::Critic http://lists.koha-community.org/pipermail/koha-patches/2010-December/013244.html
Comment 2 Julian Maurice 2011-03-15 13:45:13 UTC
The script works well and all tests were successful !
Comment 3 Julian Maurice 2011-03-15 13:45:44 UTC
Created attachment 3302 [details] [review]
Signed-off patch
Comment 4 Chris Cormack 2011-03-16 23:45:40 UTC
Pushed, please test and mark resolved

I will set Jenkins to begin running these, and maybe add a dir at a time and encourage people to fix the tests that will udoubtedly fail
Comment 5 MJ Ray (software.coop) 2011-04-03 23:22:49 UTC
This bug is mentioned in:
Bug 5485: Add script to run	Test::Perl::Critic http://lists.koha-community.org/pipermail/koha-patches/2011-March/014055.html