From 8db8c5a9f6e9618c1b0e3b62530a6a560181741d Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Mon, 7 Mar 2016 23:49:53 -0500 Subject: [PATCH 3/3] Add spelling exclusion switch. TEST PLAN --------- Run on a test file with isnt. -- spelling error Patch Run on the same file with a -s -- spelling tests skipped. --- koha-qa.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/koha-qa.pl b/koha-qa.pl index bcb43bb..a96e3d7 100755 --- a/koha-qa.pl +++ b/koha-qa.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -our ($v, $d, $c, $nocolor, $help, $no_progress); +our ($v, $d, $c, $nocolor, $help, $no_progress, $no_spelling); BEGIN { use Getopt::Long; @@ -11,6 +11,7 @@ BEGIN { 'v:s' => \$v, 'c:s' => \$c, 'd' => \$d, + 's|spelling' => \$no_spelling, 'no-progress' => \$no_progress, 'nocolor' => \$nocolor, 'h|help' => \$help, @@ -43,6 +44,9 @@ unless ( -f '/usr/bin/codespell' ) { warn "You should install codespell\n"; push @tests_to_skip, 'spelling'; } +elsif ($no_spelling) { + push @tests_to_skip, 'spelling'; +} $c = 1 unless $c; my $num_of_commits = $c; @@ -74,6 +78,8 @@ eval { $modified_files->filter( { name => [ qw< opac.less > ] } ), ); + use Data::Dumper; + print STDERR Dumper(\@files); my $i = 1; say "Processing files before patches"; -- 2.1.4