Bug 42764: Use inline codespell:ignore for SAN-Ouest Provence in templates

Rather than excluding the entire about.tt files from codespell scanning,
annotate only the specific lines containing the proper noun "Provence"
(SAN-Ouest Provence, a French library co-operative and Koha sponsor) with
an inline TT comment that codespell recognises as a per-line ignore.

This lets codespell continue to check the rest of each file for genuine
spelling mistakes, while still catching accidental "Provence" for
"Province" in any other template not carrying this annotation.

Replaces the file-level exceptions added to Koha::Devel::Files in
favour of the more surgical inline approach.

Test plan:
1. Apply patch
2. Verify "Provence" on the annotated lines produces no codespell output:
   codespell -d --ignore-words .codespell-ignore \
     koha-tmpl/intranet-tmpl/prog/en/modules/about.tt
   => no output
3. Verify the rest of about.tt is still checked by introducing a
   deliberate typo elsewhere in the file and confirming codespell flags it
4. prove xt/author/codespell.t
=> All tests pass

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
This commit is contained in:
Martin Renvoize 2026-06-04 08:06:04 +01:00
parent cc7c1aa157
commit 3ed47b65e8
No known key found for this signature in database
GPG Key ID: 2D86E0EAEC83711B
4 changed files with 9 additions and 16 deletions

View File

@ -102,13 +102,7 @@ my $exceptions = {
misc/cronjobs/rss
)
],
codespell => [
qw(
koha-tmpl/intranet-tmpl/prog/en/modules/about.tt
t/mock_templates/intranet-tmpl/prog/en/modules/about.tt
t/mock_templates/intranet-tmpl/prog/fr-CA/modules/about.tt
)
],
codespell => [],
core => [],
nonce => [qw(t/lib/plugins/Koha/Plugin/TestValuebuilder/test_valuebuilder_popup.tt)],
},

View File

@ -896,7 +896,7 @@
<li> The <a href="http://www.myacpl.org/">Athens County Public Libraries</a>, Ohio, USA (MARC sponsorship, documentation, template maintenance)</li>
<li> <a href="http://www.emn.fr">EMN (Ecole des Mines de Nantes)</a>, France (Suggestions, Stats wizards and improved LDAP sponsorship) </li>
<li> <a href="http://www.mines-paristech.fr">Mines Paristech (previously Ecole Nationale Supérieure des Mines de Paris)</a>, France (bibliographic frameworks, MARC authorities, OPAC basket, Serials sponsorship) </li>
<li> <a href="http://www.mediathequeouestprovence.fr/">SAN-Ouest Provence</a>, France (Koha 3.0 enhancements to patrons and holds modules) </li>
<li> <a href="http://www.mediathequeouestprovence.fr/">SAN-Ouest Provence</a>, France (Koha 3.0 enhancements to patrons and holds modules) [%# codespell:ignore provence %]</li>
<li> The <a href="http://ccfls.org">Crawford County Federated Library System</a>, PA, USA (Koha 3.0 Zebra Integration sponsorship)</li>
<li> The <a href="http://www.geauga.lib.oh.us/">Geauga County Public Library</a>, OH, USA (Koha 3.0 beta testing)</li>
<li> The <a href="http://library.neu.edu.tr">Near East University</a>, Cyprus</li>

View File

@ -14,8 +14,7 @@
>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="about_about" class="about">
[% INCLUDE 'header.inc' %]
<body id="about_about" class="about"> [% INCLUDE 'header.inc' %]
[% PROCESS 'about-team.inc' %]
[% WRAPPER 'sub-header.inc' %]
@ -764,7 +763,7 @@
<li> The <a href="http://www.myacpl.org/">Athens County Public Libraries</a>, Ohio, USA (MARC sponsorship, documentation, template maintenance)</li>
<li> <a href="http://www.emn.fr">EMN (Ecole des Mines de Nantes)</a>, France (Suggestions, Stats wizards and improved LDAP sponsorship) </li>
<li> <a href="http://www.mines-paristech.fr">Mines Paristech (previously Ecole Nationale Supérieure des Mines de Paris)</a>, France (bibliographic frameworks, MARC authorities, OPAC basket, Serials sponsorship) </li>
<li> <a href="http://www.mediathequeouestprovence.fr/">SAN-Ouest Provence</a>, France (Koha 3.0 enhancements to patrons and holds modules) </li>
<li> <a href="http://www.mediathequeouestprovence.fr/">SAN-Ouest Provence</a>, France (Koha 3.0 enhancements to patrons and holds modules) [%# codespell:ignore provence %]</li>
<li> The <a href="http://ccfls.org">Crawford County Federated Library System</a>, PA, USA (Koha 3.0 Zebra Integration sponsorship)</li>
<li> The <a href="http://www.geauga.lib.oh.us/">Geauga County Public Library</a>, OH, USA (Koha 3.0 beta testing)</li>
<li> The <a href="http://library.neu.edu.tr">Near East University</a>, Cyprus</li>
@ -910,7 +909,7 @@
<li>Rijksmuseum, Amsterdam, The Netherlands</li>
<li>Rolling Hills Consolidated Libraries, USA</li>
<li>Round Rock Public Library, USA</li>
<li>SAN-Ouest Provence, France</li>
<li>SAN-Ouest Provence, France[%# codespell:ignore provence %]</li>
<li>Sefton Council, United Kingdom</li>
<li>software.coop, United Kingdom</li>
<li>South-East Kansas Library System (SEKLS), USA</li>

View File

@ -764,7 +764,7 @@
<li> The <a href="http://www.myacpl.org/">Athens County Public Libraries</a>, Ohio, USA (MARC sponsorship, documentation, template maintenance)</li>
<li> <a href="http://www.emn.fr">EMN (Ecole des Mines de Nantes)</a>, France (Suggestions, Stats wizards and improved LDAP sponsorship) </li>
<li> <a href="http://www.mines-paristech.fr">Mines Paristech (previously Ecole Nationale Supérieure des Mines de Paris)</a>, France (bibliographic frameworks, MARC authorities, OPAC basket, Serials sponsorship) </li>
<li> <a href="http://www.mediathequeouestprovence.fr/">SAN-Ouest Provence</a>, France (Koha 3.0 enhancements to patrons and holds modules) </li>
<li> <a href="http://www.mediathequeouestprovence.fr/">SAN-Ouest Provence</a>, France (Koha 3.0 enhancements to patrons and holds modules) [%# codespell:ignore provence %]</li>
<li> The <a href="http://ccfls.org">Crawford County Federated Library System</a>, PA, USA (Koha 3.0 Zebra Integration sponsorship)</li>
<li> The <a href="http://www.geauga.lib.oh.us/">Geauga County Public Library</a>, OH, USA (Koha 3.0 beta testing)</li>
<li> The <a href="http://library.neu.edu.tr">Near East University</a>, Cyprus</li>
@ -910,7 +910,7 @@
<li>Rijksmuseum, Amsterdam, The Netherlands</li>
<li>Rolling Hills Consolidated Libraries, USA</li>
<li>Round Rock Public Library, USA</li>
<li>SAN-Ouest Provence, France</li>
<li>SAN-Ouest Provence, France[%# codespell:ignore provence %]</li>
<li>Sefton Council, United Kingdom</li>
<li>software.coop, United Kingdom</li>
<li>South-East Kansas Library System (SEKLS), USA</li>