FlexPMD 和 TextMate 设置问题:创建规则
我想获得一些关于如何为 Textmate 设置新规则集的帮助,因为我找不到需要修改的 pmd.xml 文件。
提前致谢
I wanted to get some assistance into how to set up new rulesets for Textmate, as I can't find the pmd.xml file that needs to be modified.
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在任何地方都找不到默认的 pmd.xml 文件,所以我只使用了 Adobe Flex PMD 规则集创建者,然后导出默认规则集。
[编辑添加]
我的项目是使用 ANT 和 Hudson 运行的,所以我只是将它放在项目的根目录中。
但是,为了使用 TextMate 正确测试这一点,我复制了我的项目以匹配以下记录的条件:
“该捆绑包目前处于实验阶段,因此需要以下内容:
然后我将 pmd 配置文件复制到项目根目录中,打开它,然后运行 FlexPMD“项目”选项。
这给人一种使用我的文件的错觉,因此我重命名了该文件并删除了除一条规则之外的所有规则,以证明它没有被使用。
TextMate FlexPMD 捆绑包文档提到:
因此,我没有创建一个会影响所有项目的全局变量,而是创建了一个 项目相关变量 通过:
所以我的变量是
TM_FLEXPMD_RULESET
,其值为pmd_rules.xml
当我运行 FlexPMD“项目”选项时,只运行一个规则。
I couldn't find a default pmd.xml file anywhere, so I just used the Adobe Flex PMD Ruleset creator and then exported the default set of rules.
[edited to add]
My project was running using ANT and Hudson so I just put it in the root of that.
However, to properly test this out using TextMate I copied my project to match the following documented conditions:
"The bundle is currently experimental, as such it expects the following:
I then copied my pmd config file into the project root, opened it, and ran the FlexPMD 'Project' option.
This gave the illusion of using my file, so I renamed the file and deleted all but one rule to prove it wasn't being used.
The TextMate FlexPMD bundle documentation mentions:
So I rather than create a global variable which would affect all projects, I created a project dependent variable by:
So my variable was
TM_FLEXPMD_RULESET
with the valuepmd_rules.xml
When I then ran the FlexPMD 'Project' option, only one rule was being run.