Procházet zdrojové kódy

Enable ProhibitUsageSubs, leaving help() off its list of names

The policy reports a sub by its name, and help is on the default list.
Here help() is a method of every data model and datasource: it returns
the link to the documentation of the query language that lang() names,
and search_language() shows the two beside the search box.  That is not
a usage message, and the scripts already print theirs with pod2usage.
So sub_names keeps the other four default names and leaves out help.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
troglodyne-bot před 1 týdnem
rodič
revize
68eb5ee297
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4 1
      .perlcriticrc

+ 4 - 1
.perlcriticrc

@@ -98,7 +98,10 @@ formats = #!/usr/bin/env perl
 [ErrorHandling::RequireCheckedIndirectResults]
 exclude_functions = print
 [ProhibitUseLib]
-#[ProhibitUsageSubs]
+[ProhibitUsageSubs]
+# tCMS: help() is the interface of a data model and a datasource that links
+# the documentation of its query language, so it is not a usage message.
+sub_names = usage _usage print_usage usage_message
 [RequireQwForLiteralLists]
 [ProhibitNoWarningsRedefine]
 [RequireFatalWarnings]