Bugzilla – Attachment 48791 Details for
Bug 16003
Add spelling exclusion patch to QA Test tools
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16003 - Add exceptions file logic to codespell call
Bug-16003---Add-exceptions-file-logic-to-codespell.patch (text/plain), 1.47 KB, created by
Mark Tompsett
on 2016-03-08 15:44:46 UTC
(
hide
)
Description:
Bug 16003 - Add exceptions file logic to codespell call
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2016-03-08 15:44:46 UTC
Size:
1.47 KB
patch
obsolete
>From 79c90e10376bc62884b06d4f39912e86a5957c7b Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Tue, 8 Mar 2016 10:38:52 -0500 >Subject: [PATCH] Bug 16003 - Add exceptions file logic to codespell call > >I created an exceptions file by: >$ git grep "isnt(" | cut -f2- -d":" | sort -u > ~/qa-test-tools/spelling.exceptions > >I then patched QohA/File.pm to include a -x extension to the >codespell call if the exceptions file existed. > >TEST PLAN >--------- >In your koha development directory apply bug 15870 >run the koha qa test tools >-- you will get a complaint about isnt(, > likely because it is tokenized as isnt. > >apply this patch to your qa test tools >run the koha qa test tools on bug 15870 again >-- spelling issue passed! >--- > QohA/File.pm | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/QohA/File.pm b/QohA/File.pm >index 420dfbd..bd217f7 100644 >--- a/QohA/File.pm >+++ b/QohA/File.pm >@@ -75,7 +75,14 @@ sub check_forbidden_patterns { > sub check_spelling { > my ($self) = @_; > >- my $cmd = q{codespell -d } . $self->path; >+ my $exception_file = dirname(abs_path($0)) . q{/QohA/spelling.exceptions}; >+ my $cmd; >+ if (-e $exception_file) { >+ $cmd = q{codespell -x } . $exception_file . q{ -d } . $self->path; >+ } >+ else { >+ $cmd = q{codespell -d } . $self->path; >+ } > my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run( command => $cmd, verbose => 0 ); > > return 0 unless @$full_buf; >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16003
:
48765
|
48782
|
48791
|
48839
|
48864