Jonathan Druart [Fri, 18 Mar 2016 13:56:34 +0000 (13:56 +0000)]
Display the file list in alphabetic order
Jonathan Druart [Wed, 9 Mar 2016 09:19:59 +0000 (09:19 +0000)]
Bug 16003: Add exception pattern list for codespell checks
The 'isnt' Test::More subroutine should not be considered as a failure
by the codespell check.
To avoid that this patch introduces the concept of "exception patterns"
for this check.
NOTE: This is better than introducing a '-x {exception file}', because
it dynamically handles the isnt( issue. If other similar function
name issues arise in the future, modifications to the
i_dont_fail_spelling.pl file and the exception list can be made.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Jonathan Druart [Fri, 12 Feb 2016 16:09:21 +0000 (16:09 +0000)]
Revert "The html filter is not needed anymore (see bug 13618)"
This reverts commit
a9ddabb936a0a1539d01992908b3e6484b6d6466.
Indranil Das Gupta (L2C2 Technologies) [Fri, 5 Feb 2016 23:36:06 +0000 (05:06 +0530)]
Bug 15753: String update in the README for qa-test-tools
Trivial string patch. Adds "sudo" to "$ apt-get install codespell" on
line number 25 of the README file.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Jonathan Druart [Mon, 1 Feb 2016 11:23:11 +0000 (11:23 +0000)]
The html filter is not needed anymore (see bug 13618)
Jonathan Druart [Mon, 1 Feb 2016 11:24:16 +0000 (11:24 +0000)]
(follow-up) type subroutine should be _type
Jonathan Druart [Tue, 19 Jan 2016 12:42:47 +0000 (12:42 +0000)]
Koha::Borrower has been moved by bug 15548
Jonathan Druart [Tue, 19 Jan 2016 11:56:44 +0000 (11:56 +0000)]
Koha::Branches has been removed by bug 15294
Jonathan Druart [Tue, 12 Jan 2016 16:57:59 +0000 (16:57 +0000)]
type subroutine should be _type
See bug 15446
Jonathan Druart [Tue, 1 Dec 2015 14:45:37 +0000 (14:45 +0000)]
Add ProhibitUnusedVariables to perlcritic rules
See bug 15258.
Jonathan Druart [Fri, 23 Oct 2015 14:29:08 +0000 (15:29 +0100)]
(follow-up) Check if opac.css and opac.less are in sync
Jonathan Druart [Fri, 23 Oct 2015 12:01:34 +0000 (13:01 +0100)]
Check if opac.css and opac.less are in sync
If opac.css and/or opac.less is changed, they must have been kept in
sync.
To sync them:
$ cd koha-tmpl/opac-tmpl
$ lessc --compress bootstrap/less/opac.less > bootstrap/css/opac.css
This test checks if
lessc --compress bootstrap/less/opac.less > /tmp/file.css
diff bootstrap/css/opac.css /tmp/file.css | wc -l
returns 0
Jonathan Druart [Fri, 23 Oct 2015 11:59:49 +0000 (12:59 +0100)]
pass attribute should be defined at File level
Jonathan Druart [Wed, 8 Jul 2015 13:27:24 +0000 (14:27 +0100)]
spelling: Don't die if codespell is not installed
codespell is not available on wheezy, the script should continue if the
bin does not exist.
The tests will be executed, but the report will mark it as skipped.
Jonathan Druart [Thu, 18 Jun 2015 14:34:16 +0000 (16:34 +0200)]
spelling follow-up: Add the test file
Jonathan Druart [Thu, 18 Jun 2015 14:29:04 +0000 (16:29 +0200)]
Add a spelling check for pl and tt files (using codespell)
You will need to install codespell to make it works.
Jonathan Druart [Tue, 7 Apr 2015 11:42:02 +0000 (13:42 +0200)]
updatedatabase.pl: "INSERT IGNORE INTO systempreferences" should be use
http://lists.koha-community.org/pipermail/koha-devel/2015-April/041310.html
Jonathan Druart [Thu, 15 Jan 2015 15:47:05 +0000 (16:47 +0100)]
Check the charset collate for kohastructure.sql
See bug 11944.
Jonathan Druart [Thu, 15 Jan 2015 16:04:08 +0000 (17:04 +0100)]
Make the tests pass
For an odd reason, the perlcriticrc was not found:
An error occured : Could not parse profile
"QohA/File/../../perlcriticrc": Failed to open file
'QohA/File/../../perlcriticrc' for reading: No such file or directory at
t/Perl.t line 210.
Jonathan Druart [Mon, 18 Aug 2014 11:07:18 +0000 (13:07 +0200)]
The prog theme for the OPAC is deprecated, now use bootstrap
See bug 12162 comment 27.
Jonathan Druart [Thu, 17 Jul 2014 09:34:41 +0000 (11:34 +0200)]
Fix unit tests - should not be based on hash keys order
Jonathan Druart [Thu, 17 Jul 2014 09:12:38 +0000 (11:12 +0200)]
template name should not contain .tmpl anymore
Jonathan Druart [Thu, 17 Jul 2014 08:52:42 +0000 (10:52 +0200)]
Add a progress bar
For big patches, the process can be very long (20 minutes).
Now you know how long you will wait :)
The --no-progress param removes this progress bar.
Jesse Weaver [Mon, 17 Mar 2014 11:04:11 +0000 (12:04 +0100)]
Remove smartmatch/given/when to work with Perl 5.18
NOTE: The change from ~~ to == on line 65 is experimental, and may cause
issues.
Jonathan Druart [Mon, 16 Dec 2013 10:02:46 +0000 (11:02 +0100)]
TT plugins have been merged (see bug 10626)
Jonathan Druart [Fri, 20 Sep 2013 08:51:39 +0000 (10:51 +0200)]
Datatables files are in an include file (see bug 10868)
Jonathan Druart [Mon, 9 Sep 2013 07:45:10 +0000 (09:45 +0200)]
wthdrawn is a typo (see bug 10550).
Jonathan Druart [Mon, 19 Aug 2013 14:16:13 +0000 (16:16 +0200)]
Exit if there are unstaged changes.
In order to avoid a lost of data, the qa tests cannot be launched if
changes are unstaged.
Jonathan Druart [Mon, 19 Aug 2013 08:41:57 +0000 (10:41 +0200)]
Specific test for sysprefs.sql
Since bug 10610 has been pushed, the installer/data/mysql/sysprefs.sql
file is sorted by syspref names.
The failure is not a blocker one. The QAer is called to propose a
followup in order to fix the order rather than to fail QA the patch.
/!\ The file was generated using the mysql order by clause. Mysql sorts
underscore last.
Jonathan Druart [Wed, 14 Aug 2013 15:19:50 +0000 (17:19 +0200)]
Koha is now under the GPLv3 license
Jonathan Druart [Wed, 17 Jul 2013 12:16:24 +0000 (14:16 +0200)]
Update README: PERL5LIB has to contain the qa-tools directory
Jonathan Druart [Wed, 17 Jul 2013 12:08:26 +0000 (14:08 +0200)]
Fix: the perlcriticrc path should be build from the package path.
On this way, the perlcriticrc file is used on launching tests and using
the koha-qa.pl script.
Jonathan Druart [Wed, 17 Jul 2013 11:42:12 +0000 (13:42 +0200)]
Fix unit tests: the koha-qa dir name should not be hardcoded
Jonathan Druart [Fri, 14 Jun 2013 12:45:33 +0000 (14:45 +0200)]
Add a bug in the todo list (commits with only deleted files)
Mason James [Mon, 10 Jun 2013 00:11:11 +0000 (12:11 +1200)]
fixing compile typo in t/data/4/perl/i_fail_patterns.pl
Mason James [Mon, 10 Jun 2013 00:55:08 +0000 (12:55 +1200)]
update POD and README
Mason James [Sun, 9 Jun 2013 23:52:21 +0000 (11:52 +1200)]
added perl-deps file
Jonathan Druart [Fri, 7 Jun 2013 12:49:01 +0000 (14:49 +0200)]
Followup Add new pattern for theme
The line containing the modified file name should not be checked.
Side effect: +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/[...] raises
an false alert.
Jonathan Druart [Fri, 7 Jun 2013 10:19:09 +0000 (12:19 +0200)]
Add new pattern for theme (see bug 2774)
Mason James [Fri, 7 Jun 2013 02:34:28 +0000 (14:34 +1200)]
just some small display tweaks...
Jonathan Druart [Wed, 22 May 2013 12:01:04 +0000 (14:01 +0200)]
Bug 10080 renames IndependantBranches to IndependentBranches
Jonathan Druart [Mon, 6 May 2013 07:12:23 +0000 (09:12 +0200)]
Followup Fix unit tests for i_fail_patterns.tt
Add missing file.
Jonathan Druart [Fri, 3 May 2013 14:02:38 +0000 (16:02 +0200)]
Fix display: if v>1 errors description should be below the filename
Jonathan Druart [Fri, 3 May 2013 13:59:38 +0000 (15:59 +0200)]
Fix unit tests for i_fail_patterns.tt
Mason James [Sat, 20 Apr 2013 13:34:40 +0000 (01:34 +1200)]
fixed tests, and made a little display format tweak
Mason James [Fri, 19 Apr 2013 15:00:05 +0000 (03:00 +1200)]
update README
Mason James [Fri, 19 Apr 2013 14:49:46 +0000 (02:49 +1200)]
add LICENSE file
Mason James [Fri, 19 Apr 2013 14:49:06 +0000 (02:49 +1200)]
always use Koha's ./t/perlcriticrc file
Jonathan Druart [Fri, 12 Apr 2013 13:08:11 +0000 (15:08 +0200)]
perlcritic check ~/.perlcritirc, not ~/perlcriticrc
Jonathan Druart [Wed, 23 Jan 2013 13:02:19 +0000 (14:02 +0100)]
FIX line number cannot be decrement if it is a deletion
Jonathan Druart [Fri, 11 Jan 2013 14:28:24 +0000 (15:28 +0100)]
Merge marker, tab and whitespace are forbidden for template files too
Jonathan Druart [Tue, 8 Jan 2013 15:07:44 +0000 (16:07 +0100)]
FIX false positive on perl critic
Sometimes, a commit is ok while it is false!
Dump of $full_buf QohA::File::Perl::check_critic for the same commit
successively executed:
$VAR1 = [
'1..1
',
'# Subroutines::ProhibitExplicitReturnUndef: Got 1 violation(s). Expected no more than 0.
',
'# Got a total of 1. Expected no more than 0.
',
'not ok 1 - Test::Perl::Critic::Progressive
',
'# Failed test \'Test::Perl::Critic::Progressive\'
',
'# Looks like you failed 1 test of 1.
'
];
* C4/Reserves.pm OK
pod OK
forbidden patterns OK
valid OK
critic OK
$VAR1 = [
'1..1
',
'# Subroutines::ProhibitExplicitReturnUndef: Got 1 violation(s). Expected no more than 0.
',
'# Too many Perl::Critic violations...
',
'# Got a total of 1. Expected no more than 0.
',
'not ok 1 - Test::Perl::Critic::Progressive
',
'# Failed test \'Test::Perl::Critic::Progressive\'
',
'# at -e line 3.
',
'# Looks like you failed 1 test of 1.
'
];
* C4/Reserves.pm FAIL
pod OK
forbidden patterns OK
valid OK
critic FAIL
# Subroutines::ProhibitExplicitReturnUndef: Got 1 violation(s).
A serialisation failed with the run command.
This patch removes all \n characters in order to remove the "Too many Perl::Critic violations"
string with the regexp $line =~ s/Expected no more than.*$//g;
Jonathan Druart [Fri, 4 Jan 2013 16:13:39 +0000 (17:13 +0100)]
Followup improved display output (FIX UT)
Jonathan Druart [Fri, 4 Jan 2013 15:57:33 +0000 (16:57 +0100)]
We don't want any simple-quote string in js code
Bug 8942 : http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8942
Jonathan Druart [Mon, 12 Nov 2012 13:38:52 +0000 (14:38 +0100)]
Remove the perlcritic error on require a module between quotes
Mason James [Mon, 5 Nov 2012 01:52:40 +0000 (14:52 +1300)]
improved display output
Mason James [Thu, 1 Nov 2012 17:30:46 +0000 (06:30 +1300)]
added 1 line, to skip 'Subroutine $FOO redefined' type warnings
Koha currently has too many of these warnings, causing false-positive fails with the koha-qa.pl testing
when we work out a way of fixing these warnings, we can revert this commit
Jonathan Druart [Wed, 24 Oct 2012 12:36:27 +0000 (14:36 +0200)]
Typo occured/occurred
Jonathan Druart [Wed, 24 Oct 2012 12:28:51 +0000 (14:28 +0200)]
add a new flag "new_file" to mark a file if it is a newly created
Mason James [Tue, 2 Oct 2012 21:11:01 +0000 (10:11 +1300)]
added ~/perlcriticrc file test
Mason James [Tue, 2 Oct 2012 20:59:01 +0000 (09:59 +1300)]
added .t files, for testing
Mason James [Tue, 2 Oct 2012 20:47:06 +0000 (09:47 +1300)]
added perlcriticrc file, updated readme
Mason James [Tue, 2 Oct 2012 20:46:38 +0000 (09:46 +1300)]
fixed perlcritic test
Jonathan Druart [Fri, 21 Sep 2012 07:19:34 +0000 (09:19 +0200)]
Build diff reports improvement
This patch test if the new patches introduce new errors even if an error
is dupplicated.
So in the case where a single error occurred and now it occurs twice, it
is a regression.
Jonathan Druart [Thu, 20 Sep 2012 14:25:28 +0000 (16:25 +0200)]
Refactoring: new File::add_to_report routine
Jonathan Druart [Thu, 20 Sep 2012 13:11:31 +0000 (15:11 +0200)]
new check for perl files: POD
Jonathan Druart [Tue, 18 Sep 2012 07:30:54 +0000 (09:30 +0200)]
Forbiden patterns: Add line number(experimental) + refactoring
Jonathan Druart [Mon, 17 Sep 2012 15:58:09 +0000 (17:58 +0200)]
UT: add unit tests for tmpl
Jonathan Druart [Mon, 17 Sep 2012 15:49:56 +0000 (17:49 +0200)]
FIX Tests order
Jonathan Druart [Mon, 17 Sep 2012 11:47:41 +0000 (13:47 +0200)]
FIX: If the error is empty, it's not really an error
e.g. if
tt_valid' => ['lines 656, 666, 687', '']
There were 3 errors for tt_valid before patches, but now there is
no error so the report must be return OK
Jonathan Druart [Mon, 17 Sep 2012 10:33:17 +0000 (12:33 +0200)]
FIX: we want the diff (between HEAD and HEAD~X) and not a detail for each commit
Jonathan Druart [Mon, 17 Sep 2012 10:28:40 +0000 (12:28 +0200)]
FIX datatype, report diff uses array and scalar
Jonathan Druart [Fri, 14 Sep 2012 14:48:10 +0000 (16:48 +0200)]
FIX: Perl valid, We can't know the line number. And forbidden pattern is only for new line (^\+)
Jonathan Druart [Thu, 13 Sep 2012 10:17:07 +0000 (12:17 +0200)]
Followup FIX the perl valid check
We want to remove the "syntax ok" line
Jonathan Druart [Tue, 11 Sep 2012 13:32:10 +0000 (15:32 +0200)]
FIX the perl valid check
If the syntax is OK, a patch could introduces some perl warnings. We
want to highlight these regressions.
Jonathan Druart [Thu, 6 Sep 2012 11:54:09 +0000 (13:54 +0200)]
[OOP] Add forbidden patterns (tabulation and widespace characters)
Jonathan Druart [Wed, 5 Sep 2012 09:57:01 +0000 (11:57 +0200)]
[OOP] FIX template checks on new files
Jonathan Druart [Mon, 3 Sep 2012 13:24:02 +0000 (15:24 +0200)]
[OOP] FIX perl_critic test We have to delete the .pc file in first
Jonathan Druart [Fri, 31 Aug 2012 15:15:27 +0000 (17:15 +0200)]
Add some POD
Jonathan Druart [Fri, 31 Aug 2012 14:54:01 +0000 (16:54 +0200)]
Add a --nocolor option to not display with color the status
By default, we display colors
Jonathan Druart [Fri, 31 Aug 2012 14:43:09 +0000 (16:43 +0200)]
Set the verbosity = 0 by default
Jonathan Druart [Thu, 30 Aug 2012 15:57:44 +0000 (17:57 +0200)]
Simplify the filter method
Jonathan Druart [Thu, 30 Aug 2012 15:34:45 +0000 (17:34 +0200)]
[OOP] Add yaml check (+ ut)
Jonathan Druart [Thu, 30 Aug 2012 06:46:04 +0000 (08:46 +0200)]
[OOP]Add unit test for perl files
Jonathan Druart [Mon, 27 Aug 2012 15:43:02 +0000 (17:43 +0200)]
[OOP] Simplify the Report->add method
Jonathan Druart [Mon, 27 Aug 2012 15:39:24 +0000 (17:39 +0200)]
[OOP] Add some pod (File and File::Perl)
Jonathan Druart [Mon, 27 Aug 2012 15:08:29 +0000 (17:08 +0200)]
[OOP] Add perl test file
Jonathan Druart [Mon, 27 Aug 2012 14:28:47 +0000 (16:28 +0200)]
(OOP] FIX perl critic on new files
Jonathan Druart [Fri, 24 Aug 2012 14:29:49 +0000 (16:29 +0200)]
[OOP] Prevent noexisting file for perl check_valid
Jonathan Druart [Mon, 27 Aug 2012 09:13:07 +0000 (11:13 +0200)]
[OOP] FIX Compatibility with perl 5.14 (push arrayref)
Jonathan Druart [Thu, 23 Aug 2012 16:15:11 +0000 (18:15 +0200)]
Introduces OOP in QohA
- Adds inheritance (File::XML, File::Perl, File::Template)
- Now each file is processed on the previous branch and on the current
branch. Before this patch the idea was to change branch batween each
tests.
It decreases the execution time:
before:
koha-qa.pl -c 5 -v 2 4,95s user 0,34s system 98% cpu 5,392 total
with this patch:
koha-qa.pl -c 5 -v 2 7,99s user 0,77s system 155% cpu 5,641 total
- Introduces a forbidden patterns check (ie. IFNULL, <<<<<<<, etc.).
This can increase the execution time. We want to think about this
utilisation. Is it really useful ?
It is a wip and cannot be executed safely !
To FIX: the check_critic does not work on new file (Is it already the
case on master ?)
TODO: POD and unit tests !
Mason James [Fri, 24 Aug 2012 04:39:40 +0000 (16:39 +1200)]
now skips testing deleted files
Mason James [Thu, 23 Aug 2012 21:52:29 +0000 (09:52 +1200)]
added -d arg for smart-comments
Mason James [Thu, 23 Aug 2012 18:05:07 +0000 (06:05 +1200)]
updated readme
Mason James [Tue, 21 Aug 2012 08:45:03 +0000 (20:45 +1200)]
fix regex typo
Mason James [Mon, 20 Aug 2012 17:28:28 +0000 (05:28 +1200)]
a fix to ignore deleted or removed files from testing
Mason James [Sat, 18 Aug 2012 00:03:31 +0000 (12:03 +1200)]
fix var typo, and remove debug
Mason James [Tue, 14 Aug 2012 05:48:13 +0000 (17:48 +1200)]
- misc tweaks
- added a new xml_valid test
modified: QohA/Errors.pm
modified: QohA/FileFind.pm
modified: QohA/Git.pm
modified: QohA/Perl.pm
modified: QohA/Template.pm
modified: koha-qa.pl
Jonathan Druart [Thu, 9 Aug 2012 09:46:14 +0000 (11:46 +0200)]
add a pre-commit git hook, useful for Koha
Jonathan Druart [Thu, 9 Aug 2012 09:43:27 +0000 (11:43 +0200)]
add a todo: If a file is deleted, we don't want to launch tests on it