Commits

Fabrice Gabolde  committed aa0e1de

MetaCPAN module now has convenient shortcut for perlcritic policies.

  • Participants
  • Parent commits 3edb585

Comments (0)

Files changed (1)

File krakenbot-metacpan.el

   (concat kbot-sender ": "
           (kbot-metacpan-try-fetching-module-metadata kbot-args)))
 
+(defun kbot-command-cpan-policy (kbot-channel-name kbot-sender &optional kbot-args)
+  "!cpan-policy SHORT-POLICY-NAME"
+  (kbot-command-cpan kbot-channel-name kbot-sender (concat "Perl::Critic::Policy::" kbot-args)))
+
 (add-to-list 'kbot-commands '("cpan" kbot-command-cpan))
+(add-to-list 'kbot-commands '("cpan-policy" kbot-command-cpan-policy))
 
 (defun kbot-metacpan-setup ()
   "Do the various things kbot-metacpan needs to work."