如何使Perl :: Critic在其输出中显示违规的策略? [英] How do I make Perl::Critic show the offending policy in its output?

查看:934
本文介绍了如何使Perl :: Critic在其输出中显示违规的策略?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已被告知可以 Perl :: Critic 显示在其输出中冒犯的策略名称。但我不记得我要做什么来打开它。如何在 perlcritic.rc ?中启用此功能?

I've been told it's possible to have Perl::Critic show the policy name that is offending in its output. But I can't recall what I have to do to turn this on. How can this be enabled in a perlcritic.rc?

推荐答案

- verbose 命令行选项可以控制此 - 如果您不想指定自己的格式,请尝试 8 9 。这两种内置格式都包含策略名称。如果您喜欢其中一个,可以将此行添加到您的 .perlcriticrc

The --verbose command-line option can control this-- if you don't want to specify your own format, try the values 8 or 9. Both of these built-in formats contain the policy name. If you like one of them, you can add this line to your .perlcriticrc:

verbose = 8

(或9,如果您喜欢该格式)

(Or 9, if you prefer that format.)

Randy

这篇关于如何使Perl :: Critic在其输出中显示违规的策略?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆